using System.ComponentModel.DataAnnotations; using System.ComponentModel; namespace Hh.Mes.POJO.ViewModel { public class CodeSavePath { [Display(Name = "实体")] [Required(ErrorMessage = "{0}路径不能为空")] [RegularExpression(@".*\.cs$", ErrorMessage = "Model文件路径不正确,必须以“.cs”结尾")] public string ModelPath { get; set; } [Display(Name = "控制器")] [Required(ErrorMessage = "{0}路径不能为空")] [RegularExpression(@".*Controller\.cs$", ErrorMessage = "Controller文件路径不正确,必须以“Controller.cs”结尾")] public string ControllerPath { get; set; } [Display(Name = "服务层")] [Required(ErrorMessage = "{0}路径不能为空")] [RegularExpression(@".*Service\.cs$", ErrorMessage = "Service文件路径不正确,必须以“Service.cs”结尾")] public string ServicePath { get; set; } [Display(Name = "视图文件")] [Required(ErrorMessage = "{0}路径不能为空")] [RegularExpression(@".*\.cshtml$", ErrorMessage = "Cshtml文件路径不正确,必须以“.cshtml”结尾")] public string CshtmlPath { get; set; } [Display(Name = "JS文件")] [Required(ErrorMessage = "{0}路径不能为空")] [RegularExpression(@".*\.js$", ErrorMessage = "JavaScript文件路径不正确,必须以“.js”结尾")] public string JavaScriptPath { get; set; } [Display(Name = "数据表名称")] [ReadOnly(true)] public string EntityName { get; set; } [Display(Name = "区域")] [ReadOnly(true)] public string AreaName { get; set; } } }