refactor(pet): 重构宠物模块实体与接口
1. 将原Pet实体重命名为UserPet,新增PetTemplate模板实体拆分宠物模板与实例数据 2. 调整IPetService泛型参数为IBaseService<UserPet> 3. 补充宠物模板相关字段与查询逻辑,完善创建默认宠物的流程 4. 替换所有Pet实体引用为UserPet,修正相关服务层查询与更新逻辑
This commit is contained in:
62
QYZH.InteractiveMagazine.Models/Entity/PetTemplate.cs
Normal file
62
QYZH.InteractiveMagazine.Models/Entity/PetTemplate.cs
Normal file
@ -0,0 +1,62 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace QYZH.InteractiveMagazine.Models.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 宠物模板表(定义不同宠物种类,支持后期多宠物扩展)
|
||||
/// </summary>
|
||||
[SugarTable("PetTemplate")]
|
||||
public partial class PetTemplate : SqlSugarBaseEntity
|
||||
{
|
||||
public PetTemplate() { }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:模板名称
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:模板描述
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:默认初始进化形态Id(关联PetEvolution.Id)
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public long DefaultEvolutionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:模板图标地址
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string IconUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:排序权重
|
||||
/// Default:0
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:模板类型: Normal, Special, Limited
|
||||
/// Default:Normal
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:状态: Active, Inactive
|
||||
/// Default:Active
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public new string Status { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user