feat: 框架搭建
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Application.Contracts.Dtos.Collectibles;
|
||||
|
||||
public class CollectiblesUserGetInput:PagedAllResultRequestDto
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Application.Contracts.Dtos.Collectibles;
|
||||
|
||||
public class CollectiblesUserGetOutputDto:EntityDto<Guid>
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Application.Contracts.Dtos.Market;
|
||||
|
||||
public class MarketGetListInput:PagedAllResultRequestDto
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Application.Contracts.Dtos.Market;
|
||||
|
||||
public class MarketGetListOutputDto:EntityDto<Guid>
|
||||
{
|
||||
|
||||
}
|
||||
@@ -7,7 +7,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Dtos\" />
|
||||
<Folder Include="IServices\" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.DigitalCollectibles.Application.Contracts.Dtos.Collectibles;
|
||||
using Yi.Framework.DigitalCollectibles.Application.Contracts.Dtos.Market;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Application.Services;
|
||||
|
||||
/// <summary>
|
||||
/// 藏品应用服务
|
||||
/// </summary>
|
||||
public class CollectiblesService:ApplicationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取当前用户的藏品
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
[HttpGet("user")]
|
||||
[Authorize]
|
||||
public async Task<PagedResultDto<CollectiblesUserGetOutputDto>> GetForAccountUserAsync(CollectiblesUserGetInput input)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.DigitalCollectibles.Application.Contracts.Dtos.Market;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Application.Services;
|
||||
|
||||
/// <summary>
|
||||
/// 市场应用服务
|
||||
/// </summary>
|
||||
public class MarketService:ApplicationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 交易市场查询
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public async Task<PagedResultDto<MarketGetListOutputDto>> GetListAsync(MarketGetListInput input)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,4 @@
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Domain.Shared.Consts;
|
||||
|
||||
/// <summary>
|
||||
/// 稀有度枚举
|
||||
/// </summary>
|
||||
public enum RarityEnum
|
||||
{
|
||||
[Display(Name = "普通")] Ordinary = 0,
|
||||
[Display(Name = "高级")] Senior = 1,
|
||||
[Display(Name = "稀有")] Rare = 2,
|
||||
[Display(Name = "珍品")] Gem = 3,
|
||||
[Display(Name = "传说")] Legend = 4
|
||||
}
|
||||
@@ -10,7 +10,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Consts\" />
|
||||
<Folder Include="Dtos\" />
|
||||
<Folder Include="Enums\" />
|
||||
<Folder Include="Etos\" />
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using SqlSugar;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Yi.Framework.Core.Data;
|
||||
using Yi.Framework.DigitalCollectibles.Domain.Shared.Consts;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Domain.Entities;
|
||||
|
||||
@@ -8,7 +10,45 @@ namespace Yi.Framework.DigitalCollectibles.Domain.Entities;
|
||||
/// 用于定义数字藏品
|
||||
/// </summary>
|
||||
[SugarTable("DC_Collectibles")]
|
||||
public class CollectiblesAggregateRoot:FullAuditedAggregateRoot<Guid>
|
||||
public class CollectiblesAggregateRoot:FullAuditedAggregateRoot<Guid>,IOrderNum
|
||||
{
|
||||
/// <summary>
|
||||
/// 藏品编号
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 藏品名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 藏品描述
|
||||
/// </summary>
|
||||
public string? Describe { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 价值数
|
||||
/// </summary>
|
||||
public decimal ValueNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 藏品地址
|
||||
/// </summary>
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 稀有度
|
||||
/// </summary>
|
||||
public RarityEnum Rarity{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总共出现次数
|
||||
/// </summary>
|
||||
public int FindTotal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int OrderNum { get; set; }
|
||||
}
|
||||
@@ -10,5 +10,18 @@ namespace Yi.Framework.DigitalCollectibles.Domain.Entities;
|
||||
[SugarTable("DC_CollectiblesUserExtraInfo")]
|
||||
public class CollectiblesUserExtraInfoEntity: Entity<Guid>
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
/// </summary>
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 手机号
|
||||
/// </summary>
|
||||
public string Phone{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 微信openid
|
||||
/// </summary>
|
||||
public string WeChatOpenId { get; set; }
|
||||
}
|
||||
@@ -10,5 +10,13 @@ namespace Yi.Framework.DigitalCollectibles.Domain.Entities;
|
||||
[SugarTable("DC_CollectiblesUserStore")]
|
||||
public class CollectiblesUserStoreAggregateRoot:FullAuditedAggregateRoot<Guid>
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
/// </summary>
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 藏品id
|
||||
/// </summary>
|
||||
public Guid CollectiblesId { get; set; }
|
||||
}
|
||||
@@ -10,5 +10,23 @@ namespace Yi.Framework.DigitalCollectibles.Domain.Entities;
|
||||
[SugarTable("DC_MarketGoods")]
|
||||
public class MarketGoodsAggregateRoot:FullAuditedAggregateRoot<Guid>
|
||||
{
|
||||
/// <summary>
|
||||
/// 出售者用户id
|
||||
/// </summary>
|
||||
public Guid SellUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 藏品id
|
||||
/// </summary>
|
||||
public Guid CollectiblesId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 出售数量
|
||||
/// </summary>
|
||||
public int SellNumber{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 出售单价
|
||||
/// </summary>
|
||||
public decimal UnitPrice{ get; set; }
|
||||
}
|
||||
@@ -11,5 +11,28 @@ namespace Yi.Framework.DigitalCollectibles.Domain.Entities;
|
||||
[SugarTable("DC_OnHook")]
|
||||
public class OnHookAggregateRoot:FullAuditedAggregateRoot<Guid>
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
/// </summary>
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
public DateTime? StarTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 有效小时数
|
||||
/// </summary>
|
||||
public int EffectiveHours{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否激活
|
||||
/// </summary>
|
||||
public bool IsActive{ get; set; }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Volo.Abp.Domain.Services;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Domain.Managers;
|
||||
/// <summary>
|
||||
/// 藏品领域服务
|
||||
/// 用于管理用户的藏品库存、藏品的业务逻辑
|
||||
/// </summary>
|
||||
public class CollectiblesManager:DomainService
|
||||
{
|
||||
|
||||
}
|
||||
@@ -8,5 +8,4 @@ namespace Yi.Framework.DigitalCollectibles.Domain.Managers;
|
||||
/// </summary>
|
||||
public class MiningPoolManager:DomainService
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user