refactor(pet): 重构宠物模块实体与接口
1. 将原Pet实体重命名为UserPet,新增PetTemplate模板实体拆分宠物模板与实例数据 2. 调整IPetService泛型参数为IBaseService<UserPet> 3. 补充宠物模板相关字段与查询逻辑,完善创建默认宠物的流程 4. 替换所有Pet实体引用为UserPet,修正相关服务层查询与更新逻辑
This commit is contained in:
99
QYZH.InteractiveMagazine.Models/Entity/UserPet.cs
Normal file
99
QYZH.InteractiveMagazine.Models/Entity/UserPet.cs
Normal file
@ -0,0 +1,99 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace QYZH.InteractiveMagazine.Models.Entity
|
||||
{
|
||||
///<summary>
|
||||
///用户宠物实例表
|
||||
///</summary>
|
||||
[SugarTable("UserPet")]
|
||||
public partial class UserPet : SqlSugarBaseEntity
|
||||
{
|
||||
public UserPet()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:用户Id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public long UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:宠物模板Id(关联PetTemplate.Id)
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public long TemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:宠物昵称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:当前进化形态Id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public long CurrentEvolutionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:当前成长值
|
||||
/// Default:0
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public int GrowthPoints { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:累计喂养次数
|
||||
/// Default:0
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public int FeedingCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:当前皮肤Id(0为默认皮肤)
|
||||
/// Default:0
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public long CurrentSkinId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:宠物类型
|
||||
/// Default:Normal
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:状态: Inactive, Active, Sleeping
|
||||
/// Default:Inactive
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public new string Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 理解力
|
||||
/// </summary>
|
||||
public int Comprehension { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 判断力
|
||||
/// </summary>
|
||||
public int Judgment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表达力
|
||||
/// </summary>
|
||||
public int Expression { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 说服力
|
||||
/// </summary>
|
||||
public int Persuasiveness { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user