using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Abp.Domain.Entities.Auditing; using WeOnlineApp.Authorization.Users; using WeOnlineApp.Configuration; namespace WeOnlineApp.TrainingCamp { /// /// 演练参与者信息 /// [Table("Train_CampPlayUsers")] public class CampPlayUserInfo : CreationAuditedEntity { /// /// 培训营编号 /// [MaxLength(IwbConsts.PrimaryKey), Index] public string CampNo { get; set; } /// /// 演练营 /// [MaxLength(IwbConsts.PrimaryKey), Index] public string PlayNo { get; set; } [ForeignKey("PlayNo")] public CampPlayInfo CampPlayInfo { get; set; } /// /// 演练名称 /// [NotMapped] public string PlayName => CampPlayInfo?.Name ?? ""; /// /// 参与者 /// public long PlayUserId { get; set; } [ForeignKey("PlayUserId")] public User Player { get; set; } /// /// 用户名 /// [NotMapped] public string UserName => Player?.UserName ?? ""; /// /// 参与者姓名 /// [NotMapped] public string PlayerName => Player?.Name ?? ""; /// /// 参与者类型 /// public int PlayerType { get; set; } /// /// 参与者状态 /// public int PlayerState { get; set; } /// /// 参与角色 /// [MaxLength(50)] public string Role { get; set; } } }