feat: 添加sample示例

This commit is contained in:
陈淳
2024-01-10 17:26:40 +08:00
parent a3f7c1e867
commit 2c8d579668
43 changed files with 907 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="8.0.0" />
<PackageReference Include="Volo.Abp.Caching" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\framework\Yi.Framework.Mapster\Yi.Framework.Mapster.csproj" />
<ProjectReference Include="..\..\framework\Yi.Framework.SqlSugarCore.Abstractions\Yi.Framework.SqlSugarCore.Abstractions.csproj" />
<ProjectReference Include="..\..\module\bbs\Yi.Framework.Bbs.Domain\Yi.Framework.Bbs.Domain.csproj" />
<ProjectReference Include="..\..\module\rbac\Yi.Framework.Rbac.Domain\Yi.Framework.Rbac.Domain.csproj" />
<ProjectReference Include="..\Acme.BookStore.Domain.Shared\Acme.BookStore.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Managers\" />
<Folder Include="Repositories\" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,24 @@
using Acme.BookStore.Domain.Shared.Enums;
using SqlSugar;
using Volo.Abp.Data;
using Volo.Abp.Domain.Entities.Auditing;
namespace Acme.BookStore.Domain.Entities
{
[SugarTable("Book")]
public class BookAggregateRoot : AuditedAggregateRoot<Guid>
{
[SugarColumn(IsPrimaryKey = true)]
public override Guid Id { get; protected set; }
public string Name { get; set; }
public BookTypeEnum Type { get; set; }
public DateTime PublishDate { get; set; }
public float Price { get; set; }
[SugarColumn(IsIgnore = true)]
public override ExtraPropertyDictionary ExtraProperties { get; protected set; }
}
}

View File

@@ -0,0 +1,26 @@
using Volo.Abp.Caching;
using Volo.Abp.Domain;
using Volo.Abp.Modularity;
using Acme.BookStore.Domain.Shared;
using Yi.Framework.Bbs.Domain;
using Yi.Framework.Mapster;
using Yi.Framework.Rbac.Domain;
namespace Acme.BookStore.Domain
{
[DependsOn(
typeof(YiAbpDomainSharedModule),
typeof(YiFrameworkRbacDomainModule),
typeof(YiFrameworkBbsDomainModule),
typeof(YiFrameworkMapsterModule),
typeof(AbpDddDomainModule),
typeof(AbpCachingModule)
)]
public class YiAbpDomainModule : AbpModule
{
}
}