//ActivityFlowContent是实体模型的model类
//ActivityFlowContentMetadata是自己写的model类
//这两个类属性相同可以形成映射关系,ActivityFlowContent中还可以加其他额外字段
[MetadataType(typeof(ActivityFlowContentMetadata))]
public partial class ActivityFlowContent : IBaseEntity{
[Display(Name = "活动流程分类")]
public string ActivityClassificIDOld { get; set; }
#region 自定义属性
#endregion
}
public class ActivityFlowContentMetadata
{
[ScaffoldColumn(false)]
[Display(Name = "主键", Order = 1)]
public string ID { get; set; }
[ScaffoldColumn(true)]
[StringLength(36, ErrorMessage = "长度不可超过36")]
[Display(Name = "活动分类ID", Order = 2)]
public object ActivityClassificID { get; set; }
[ScaffoldColumn(true)]
[StringLength(200, ErrorMessage = "长度不可超过200")]
[Display(Name = "活动摘要", Order = 3)]
public object Sumary { get; set; }
[ScaffoldColumn(true)]
[DataType(DataType.MultilineText,ErrorMessage="字符格式不正确")]
[Display(Name = "活动内容", Order = 4)]
public object Content { get; set; }
[ScaffoldColumn(true)]
[StringLength(50, ErrorMessage = "长度不可超过50")]
[Display(Name = "关键字", Order = 5)]
public object Keywords { get; set; }
}