using System;
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_CampPlayInfos")]
public class CampPlayInfo : CreationAuditedEntity
{
public const int NameLength = 50;
public const int OrganizerLength = 100;
public const int ContactInfoLength = 50;
public const int VariableLength = 1000;
public const int PackageNoLength = 20;
public const int RoleNamesLength = 500;
public const int DescLength = 500;
public const int TagLength = 500;
///
/// 培训营名称
///
[MaxLength(NameLength)]
public string Name { get; set; }
///
/// 培训营
///
[MaxLength(IwbConsts.PrimaryKey), Index]
public string CampNo { get; set; }
[ForeignKey("CampNo")]
public CampInfo CampInfo { get; set; }
///
/// 培训营名称
///
[NotMapped]
public string CampName => CampInfo?.Name ?? "";
///
/// 演练模式
///
public int PlayModel { get; set; }
///
/// 是否公开
///
public bool IsPublic { get; set; }
///
/// 邀请码
///
public string InvitationCode { get; set; }
///
/// 演练角色
///
[MaxLength(RoleNamesLength)]
public string PlayRoleNames { get; set; }
///
/// 演练状态
///
public int PlayState { get; set; }
///
/// 当前轮次
///
public int RoundIndex { get; set; }
///
/// 开始时间
///
public DateTime? StartDate { get; set; }
///
/// 结束时间
///
public DateTime? EndDate { get; set; }
///
/// 演练时长
///
public decimal TrainingMinute { get; set; }
///
/// 演练信息
///
[MaxLength(Int32.MaxValue)]
public string RunningInfo { get; set; }
///
/// 备注
///
[MaxLength(RemarkLength)]
public string Remark { get; set; }
public const int RemarkLength = 500;
}
}