feat: 添加sample示例
This commit is contained in:
@@ -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>
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user