CodeSavePath.cs
1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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; }
}
}