mirror of https://github.com/EasyAbp/EShop.git
45 changed files with 6181 additions and 38 deletions
@ -0,0 +1,12 @@ |
|||
using System; |
|||
using System.ComponentModel; |
|||
namespace EasyAbp.EShop.Plugins.Booking.StoreAssetCategories.Dtos |
|||
{ |
|||
[Serializable] |
|||
public class CreateUpdateStoreAssetCategoryDto |
|||
{ |
|||
public Guid StoreId { get; set; } |
|||
|
|||
public Guid AssetCategoryId { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using System; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.StoreAssetCategories.Dtos |
|||
{ |
|||
[Serializable] |
|||
public class StoreAssetCategoryDto : AuditedEntityDto<Guid> |
|||
{ |
|||
public Guid StoreId { get; set; } |
|||
|
|||
public Guid AssetCategoryId { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
using System; |
|||
using EasyAbp.EShop.Plugins.Booking.StoreAssetCategories.Dtos; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.Application.Services; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.StoreAssetCategories |
|||
{ |
|||
public interface IStoreAssetCategoryAppService : |
|||
ICrudAppService< |
|||
StoreAssetCategoryDto, |
|||
Guid, |
|||
PagedAndSortedResultRequestDto, |
|||
CreateUpdateStoreAssetCategoryDto, |
|||
CreateUpdateStoreAssetCategoryDto> |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
using System; |
|||
using EasyAbp.EShop.Plugins.Booking.Permissions; |
|||
using EasyAbp.EShop.Plugins.Booking.StoreAssetCategories.Dtos; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.Application.Services; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.StoreAssetCategories |
|||
{ |
|||
public class StoreAssetCategoryAppService : CrudAppService<StoreAssetCategory, StoreAssetCategoryDto, Guid, PagedAndSortedResultRequestDto, CreateUpdateStoreAssetCategoryDto, CreateUpdateStoreAssetCategoryDto>, |
|||
IStoreAssetCategoryAppService |
|||
{ |
|||
protected override string GetPolicyName { get; set; } = BookingPermissions.StoreAssetCategory.Default; |
|||
protected override string GetListPolicyName { get; set; } = BookingPermissions.StoreAssetCategory.Default; |
|||
protected override string CreatePolicyName { get; set; } = BookingPermissions.StoreAssetCategory.Create; |
|||
protected override string UpdatePolicyName { get; set; } = BookingPermissions.StoreAssetCategory.Update; |
|||
protected override string DeletePolicyName { get; set; } = BookingPermissions.StoreAssetCategory.Delete; |
|||
|
|||
private readonly IStoreAssetCategoryRepository _repository; |
|||
|
|||
public StoreAssetCategoryAppService(IStoreAssetCategoryRepository repository) : base(repository) |
|||
{ |
|||
_repository = repository; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Repositories; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.StoreAssetCategories |
|||
{ |
|||
public interface IStoreAssetCategoryRepository : IRepository<StoreAssetCategory, Guid> |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Volo.Abp.MultiTenancy; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.StoreAssetCategories; |
|||
|
|||
/// <summary>
|
|||
/// Mapping of Store to AssetCategory.
|
|||
/// It determines which AssetCategory can a store owner set to provide booking service as a product of its store.
|
|||
/// Stores can use all the sub-categories if you set a parent category for them.
|
|||
/// </summary>
|
|||
public class StoreAssetCategory : AuditedAggregateRoot<Guid>, IMultiTenant |
|||
{ |
|||
public virtual Guid? TenantId { get; protected set; } |
|||
|
|||
public virtual Guid StoreId { get; protected set; } |
|||
|
|||
public virtual Guid AssetCategoryId { get; protected set; } |
|||
|
|||
protected StoreAssetCategory() |
|||
{ |
|||
} |
|||
|
|||
public StoreAssetCategory(Guid id, Guid? tenantId, Guid storeId, Guid assetCategoryId) : base(id) |
|||
{ |
|||
TenantId = tenantId; |
|||
StoreId = storeId; |
|||
AssetCategoryId = assetCategoryId; |
|||
} |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
using System.Linq; |
|||
using Microsoft.EntityFrameworkCore; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.StoreAssetCategories |
|||
{ |
|||
public static class StoreAssetCategoryEfCoreQueryableExtensions |
|||
{ |
|||
public static IQueryable<StoreAssetCategory> IncludeDetails(this IQueryable<StoreAssetCategory> queryable, bool include = true) |
|||
{ |
|||
if (!include) |
|||
{ |
|||
return queryable; |
|||
} |
|||
|
|||
return queryable |
|||
// .Include(x => x.xxx) // TODO: AbpHelper generated
|
|||
; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
using System; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; |
|||
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.StoreAssetCategories |
|||
{ |
|||
public class StoreAssetCategoryRepository : EfCoreRepository<IBookingDbContext, StoreAssetCategory, Guid>, IStoreAssetCategoryRepository |
|||
{ |
|||
public StoreAssetCategoryRepository(IDbContextProvider<IBookingDbContext> dbContextProvider) : base(dbContextProvider) |
|||
{ |
|||
} |
|||
|
|||
public override async Task<IQueryable<StoreAssetCategory>> WithDetailsAsync() |
|||
{ |
|||
return (await GetQueryableAsync()).IncludeDetails(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,57 @@ |
|||
using System; |
|||
using EasyAbp.EShop.Plugins.Booking.StoreAssetCategories.Dtos; |
|||
using Volo.Abp.Application.Dtos; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.StoreAssetCategories |
|||
{ |
|||
[RemoteService(Name = "BookingStoreAssetCategory")] |
|||
[Route("/api/booking/store-asset-category")] |
|||
public class StoreAssetCategoryController : BookingController, IStoreAssetCategoryAppService |
|||
{ |
|||
private readonly IStoreAssetCategoryAppService _service; |
|||
|
|||
public StoreAssetCategoryController(IStoreAssetCategoryAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpPost] |
|||
[Route("")] |
|||
public virtual Task<StoreAssetCategoryDto> CreateAsync(CreateUpdateStoreAssetCategoryDto input) |
|||
{ |
|||
return _service.CreateAsync(input); |
|||
} |
|||
|
|||
[HttpPut] |
|||
[Route("{id}")] |
|||
public virtual Task<StoreAssetCategoryDto> UpdateAsync(Guid id, CreateUpdateStoreAssetCategoryDto input) |
|||
{ |
|||
return _service.UpdateAsync(id, input); |
|||
} |
|||
|
|||
[HttpDelete] |
|||
[Route("{id}")] |
|||
public virtual Task DeleteAsync(Guid id) |
|||
{ |
|||
return _service.DeleteAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public virtual Task<StoreAssetCategoryDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("")] |
|||
public virtual Task<PagedResultDto<StoreAssetCategoryDto>> GetListAsync(PagedAndSortedResultRequestDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
@page |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; |
|||
@using EasyAbp.EShop.Plugins.Booking.Localization |
|||
@inject IHtmlLocalizer<BookingResource> L |
|||
@model EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.StoreAssetCategories.StoreAssetCategory.CreateModalModel |
|||
@{ |
|||
Layout = null; |
|||
} |
|||
<abp-dynamic-form abp-model="ViewModel" data-ajaxForm="true" asp-page="CreateModal"> |
|||
<abp-modal> |
|||
<abp-modal-header title="@L["CreateStoreAssetCategory"].Value"></abp-modal-header> |
|||
<abp-modal-body> |
|||
<abp-form-content /> |
|||
</abp-modal-body> |
|||
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer> |
|||
</abp-modal> |
|||
</abp-dynamic-form> |
|||
@ -0,0 +1,28 @@ |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Plugins.Booking.StoreAssetCategories; |
|||
using EasyAbp.EShop.Plugins.Booking.StoreAssetCategories.Dtos; |
|||
using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.StoreAssetCategories.StoreAssetCategory.ViewModels; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.StoreAssetCategories.StoreAssetCategory |
|||
{ |
|||
public class CreateModalModel : BookingPageModel |
|||
{ |
|||
[BindProperty] |
|||
public CreateEditStoreAssetCategoryViewModel ViewModel { get; set; } |
|||
|
|||
private readonly IStoreAssetCategoryAppService _service; |
|||
|
|||
public CreateModalModel(IStoreAssetCategoryAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
public virtual async Task<IActionResult> OnPostAsync() |
|||
{ |
|||
var dto = ObjectMapper.Map<CreateEditStoreAssetCategoryViewModel, CreateUpdateStoreAssetCategoryDto>(ViewModel); |
|||
await _service.CreateAsync(dto); |
|||
return NoContent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
@page |
|||
@using EasyAbp.EShop.Plugins.Booking.Localization |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; |
|||
@inject IHtmlLocalizer<BookingResource> L |
|||
@model EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.StoreAssetCategories.StoreAssetCategory.EditModalModel |
|||
@{ |
|||
Layout = null; |
|||
} |
|||
<abp-dynamic-form abp-model="ViewModel" data-ajaxForm="true" asp-page="EditModal"> |
|||
<abp-modal> |
|||
<abp-modal-header title="@L["EditStoreAssetCategory"].Value"></abp-modal-header> |
|||
<abp-modal-body> |
|||
<abp-input asp-for="Id" /> |
|||
<abp-form-content /> |
|||
</abp-modal-body> |
|||
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer> |
|||
</abp-modal> |
|||
</abp-dynamic-form> |
|||
@ -0,0 +1,39 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Plugins.Booking.StoreAssetCategories; |
|||
using EasyAbp.EShop.Plugins.Booking.StoreAssetCategories.Dtos; |
|||
using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.StoreAssetCategories.StoreAssetCategory.ViewModels; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.StoreAssetCategories.StoreAssetCategory |
|||
{ |
|||
public class EditModalModel : BookingPageModel |
|||
{ |
|||
[HiddenInput] |
|||
[BindProperty(SupportsGet = true)] |
|||
public Guid Id { get; set; } |
|||
|
|||
[BindProperty] |
|||
public CreateEditStoreAssetCategoryViewModel ViewModel { get; set; } |
|||
|
|||
private readonly IStoreAssetCategoryAppService _service; |
|||
|
|||
public EditModalModel(IStoreAssetCategoryAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
public virtual async Task OnGetAsync() |
|||
{ |
|||
var dto = await _service.GetAsync(Id); |
|||
ViewModel = ObjectMapper.Map<StoreAssetCategoryDto, CreateEditStoreAssetCategoryViewModel>(dto); |
|||
} |
|||
|
|||
public virtual async Task<IActionResult> OnPostAsync() |
|||
{ |
|||
var dto = ObjectMapper.Map<CreateEditStoreAssetCategoryViewModel, CreateUpdateStoreAssetCategoryDto>(ViewModel); |
|||
await _service.UpdateAsync(Id, dto); |
|||
return NoContent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
@page |
|||
@using EasyAbp.EShop.Plugins.Booking.Permissions |
|||
@using Microsoft.AspNetCore.Authorization |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@using Volo.Abp.AspNetCore.Mvc.UI.Layout |
|||
@using EasyAbp.EShop.Plugins.Booking.Localization |
|||
@using EasyAbp.EShop.Plugins.Booking.Web.Menus |
|||
@using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.StoreAssetCategories.StoreAssetCategory |
|||
@model IndexModel |
|||
@inject IPageLayout PageLayout |
|||
@inject IHtmlLocalizer<BookingResource> L |
|||
@inject IAuthorizationService Authorization |
|||
@{ |
|||
PageLayout.Content.Title = L["StoreAssetCategory"].Value; |
|||
PageLayout.Content.BreadCrumb.Add(L["Menu:StoreAssetCategory"].Value); |
|||
PageLayout.Content.MenuItemName = BookingMenus.StoreAssetCategory; |
|||
} |
|||
|
|||
@section scripts |
|||
{ |
|||
<abp-script src="/Pages/EShop/Plugins/Booking/StoreAssetCategories/StoreAssetCategory/index.js" /> |
|||
} |
|||
@section styles |
|||
{ |
|||
<abp-style src="/Pages/EShop/Plugins/Booking/StoreAssetCategories/StoreAssetCategory/index.css"/> |
|||
} |
|||
|
|||
<abp-card> |
|||
<abp-card-header> |
|||
<abp-row> |
|||
<abp-column size-md="_6"> |
|||
<abp-card-title>@L["StoreAssetCategory"]</abp-card-title> |
|||
</abp-column> |
|||
<abp-column size-md="_6" class="text-end"> |
|||
@if (await Authorization.IsGrantedAsync(BookingPermissions.StoreAssetCategory.Create)) |
|||
{ |
|||
<abp-button id="NewStoreAssetCategoryButton" |
|||
text="@L["CreateStoreAssetCategory"].Value" |
|||
icon="plus" |
|||
button-type="Primary" /> |
|||
} |
|||
</abp-column> |
|||
</abp-row> |
|||
</abp-card-header> |
|||
<abp-card-body> |
|||
<abp-table striped-rows="true" id="StoreAssetCategoryTable" class="nowrap"/> |
|||
</abp-card-body> |
|||
</abp-card> |
|||
@ -0,0 +1,12 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.StoreAssetCategories.StoreAssetCategory |
|||
{ |
|||
public class IndexModel : BookingPageModel |
|||
{ |
|||
public virtual async Task OnGetAsync() |
|||
{ |
|||
await Task.CompletedTask; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using EasyAbp.Abp.TagHelperPlus.EasySelector; |
|||
using EasyAbp.BookingService; |
|||
using EasyAbp.EShop.Stores; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.StoreAssetCategories.StoreAssetCategory.ViewModels |
|||
{ |
|||
public class CreateEditStoreAssetCategoryViewModel |
|||
{ |
|||
[EasySelector( |
|||
getListedDataSourceUrl: StoresConsts.GetStoreListedDataSourceUrl + "?onlyManageable=true", |
|||
getSingleDataSourceUrl: StoresConsts.GetStoreSingleDataSourceUrl, |
|||
keyPropertyName: "id", |
|||
textPropertyName: "name", |
|||
moduleName: EShopStoresRemoteServiceConsts.ModuleName)] |
|||
[Display(Name = "StoreAssetCategoryStoreId")] |
|||
public Guid StoreId { get; set; } |
|||
|
|||
[EasySelector( |
|||
getListedDataSourceUrl: BookingServiceUrls.GetAssetCategoryListedDataSourceUrl, |
|||
getSingleDataSourceUrl: BookingServiceUrls.GetAssetCategorySingleDataSourceUrl, |
|||
keyPropertyName: "id", |
|||
textPropertyName: "name", |
|||
moduleName: BookingServiceRemoteServiceConsts.ModuleName)] |
|||
[Display(Name = "StoreAssetCategoryAssetCategoryId")] |
|||
public Guid AssetCategoryId { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,70 @@ |
|||
$(function () { |
|||
|
|||
var l = abp.localization.getResource('EasyAbpEShopPluginsBooking'); |
|||
|
|||
var service = easyAbp.eShop.plugins.booking.storeAssetCategories.storeAssetCategory; |
|||
var createModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/Booking/StoreAssetCategories/StoreAssetCategory/CreateModal'); |
|||
var editModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/Booking/StoreAssetCategories/StoreAssetCategory/EditModal'); |
|||
|
|||
var dataTable = $('#StoreAssetCategoryTable').DataTable(abp.libs.datatables.normalizeConfiguration({ |
|||
processing: true, |
|||
serverSide: true, |
|||
paging: true, |
|||
searching: false, |
|||
autoWidth: false, |
|||
scrollCollapse: true, |
|||
order: [[0, "asc"]], |
|||
ajax: abp.libs.datatables.createAjax(service.getList), |
|||
columnDefs: [ |
|||
{ |
|||
rowAction: { |
|||
items: |
|||
[ |
|||
{ |
|||
text: l('Edit'), |
|||
visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.Booking.StoreAssetCategory.Update'), |
|||
action: function (data) { |
|||
editModal.open({ id: data.record.id }); |
|||
} |
|||
}, |
|||
{ |
|||
text: l('Delete'), |
|||
visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.Booking.StoreAssetCategory.Delete'), |
|||
confirmMessage: function (data) { |
|||
return l('StoreAssetCategoryDeletionConfirmationMessage', data.record.id); |
|||
}, |
|||
action: function (data) { |
|||
service.delete(data.record.id) |
|||
.then(function () { |
|||
abp.notify.info(l('SuccessfullyDeleted')); |
|||
dataTable.ajax.reload(); |
|||
}); |
|||
} |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
{ |
|||
title: l('StoreAssetCategoryStoreId'), |
|||
data: "storeId" |
|||
}, |
|||
{ |
|||
title: l('StoreAssetCategoryAssetCategoryId'), |
|||
data: "assetCategoryId" |
|||
}, |
|||
] |
|||
})); |
|||
|
|||
createModal.onResult(function () { |
|||
dataTable.ajax.reload(); |
|||
}); |
|||
|
|||
editModal.onResult(function () { |
|||
dataTable.ajax.reload(); |
|||
}); |
|||
|
|||
$('#NewStoreAssetCategoryButton').click(function (e) { |
|||
e.preventDefault(); |
|||
createModal.open(); |
|||
}); |
|||
}); |
|||
@ -0,0 +1,28 @@ |
|||
using Shouldly; |
|||
using System.Threading.Tasks; |
|||
using Xunit; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.StoreAssetCategories |
|||
{ |
|||
public class StoreAssetCategoryAppServiceTests : BookingApplicationTestBase |
|||
{ |
|||
private readonly IStoreAssetCategoryAppService _storeAssetCategoryAppService; |
|||
|
|||
public StoreAssetCategoryAppServiceTests() |
|||
{ |
|||
_storeAssetCategoryAppService = GetRequiredService<IStoreAssetCategoryAppService>(); |
|||
} |
|||
|
|||
/* |
|||
[Fact] |
|||
public async Task Test1() |
|||
{ |
|||
// Arrange
|
|||
|
|||
// Act
|
|||
|
|||
// Assert
|
|||
} |
|||
*/ |
|||
} |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
using System.Threading.Tasks; |
|||
using Shouldly; |
|||
using Xunit; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.StoreAssetCategories |
|||
{ |
|||
public class StoreAssetCategoryDomainTests : BookingDomainTestBase |
|||
{ |
|||
public StoreAssetCategoryDomainTests() |
|||
{ |
|||
} |
|||
|
|||
/* |
|||
[Fact] |
|||
public async Task Test1() |
|||
{ |
|||
// Arrange
|
|||
|
|||
// Assert
|
|||
|
|||
// Assert
|
|||
} |
|||
*/ |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Plugins.Booking.StoreAssetCategories; |
|||
using Volo.Abp.Domain.Repositories; |
|||
using Xunit; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.StoreAssetCategories |
|||
{ |
|||
public class StoreAssetCategoryRepositoryTests : BookingEntityFrameworkCoreTestBase |
|||
{ |
|||
private readonly IStoreAssetCategoryRepository _storeAssetCategoryRepository; |
|||
|
|||
public StoreAssetCategoryRepositoryTests() |
|||
{ |
|||
_storeAssetCategoryRepository = GetRequiredService<IStoreAssetCategoryRepository>(); |
|||
} |
|||
|
|||
/* |
|||
[Fact] |
|||
public async Task Test1() |
|||
{ |
|||
await WithUnitOfWorkAsync(async () => |
|||
{ |
|||
// Arrange
|
|||
|
|||
// Act
|
|||
|
|||
//Assert
|
|||
}); |
|||
} |
|||
*/ |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,39 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace EShopSample.Migrations |
|||
{ |
|||
public partial class AddedStoreAssetCategory : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "EasyAbpEShopPluginsBookingStoreAssetCategories", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
StoreId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
AssetCategoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_EasyAbpEShopPluginsBookingStoreAssetCategories", x => x.Id); |
|||
}); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "EasyAbpEShopPluginsBookingStoreAssetCategories"); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue