diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index 877e7596..3fa80aff 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -3347,7 +3347,7 @@ 表中文名 - + 是否校验唯一性 diff --git a/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs b/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs index 4455b6f6..f64c5899 100644 --- a/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs +++ b/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs @@ -555,7 +555,7 @@ public static class EntityProperties var description = property.GetDescription(); if (property.ContainsCustomAttributes(typeof(EntityColumnAttribute))) { - var is1 = ((EntityColumnAttribute)objAtrr).IsOnly; + var is1 = ((EntityColumnAttribute)objAtrr).Unique; if (is1) { names.Add(property.Name); diff --git a/Tiobon.Core.Model/Base/Ghre/Ghre_Course.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghre/Ghre_Course.Dto.Base.cs index 213a751b..10da0913 100644 --- a/Tiobon.Core.Model/Base/Ghre/Ghre_Course.Dto.Base.cs +++ b/Tiobon.Core.Model/Base/Ghre/Ghre_Course.Dto.Base.cs @@ -29,13 +29,13 @@ namespace Tiobon.Core.Model.Models /// /// 课程编号 /// - [Display(Name = "CourseNo"), Description("课程编号"), MaxLength(32, ErrorMessage = "课程编号 不能超过 32 个字符"), EntityColumn(IsOnly = true)] + [Display(Name = "CourseNo"), Description("课程编号"), MaxLength(32, ErrorMessage = "课程编号 不能超过 32 个字符"), EntityColumn(Unique = true)] public string CourseNo { get; set; } /// /// 课程名称 /// - [Display(Name = "CourseName"), Description("课程名称"), MaxLength(32, ErrorMessage = "课程名称 不能超过 32 个字符"), EntityColumn(IsOnly = true)] + [Display(Name = "CourseName"), Description("课程名称"), MaxLength(32, ErrorMessage = "课程名称 不能超过 32 个字符"), EntityColumn(Unique = true)] public string CourseName { get; set; } /// diff --git a/Tiobon.Core.Model/Base/Ghre/Ghre_CourseClass.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghre/Ghre_CourseClass.Dto.Base.cs index b6c0ec2f..3fcd7d12 100644 --- a/Tiobon.Core.Model/Base/Ghre/Ghre_CourseClass.Dto.Base.cs +++ b/Tiobon.Core.Model/Base/Ghre/Ghre_CourseClass.Dto.Base.cs @@ -29,13 +29,13 @@ namespace Tiobon.Core.Model.Models /// /// 分类编号 /// - [Display(Name = "ClassNo"), Description("分类编号"), MaxLength(32, ErrorMessage = "分类编号 不能超过 32 个字符"), EntityColumn(IsOnly = true)] + [Display(Name = "ClassNo"), Description("分类编号"), MaxLength(32, ErrorMessage = "分类编号 不能超过 32 个字符"), EntityColumn(Unique = true)] public string ClassNo { get; set; } /// /// 分类名称 /// - [Display(Name = "ClassName"), Description("分类名称"), MaxLength(32, ErrorMessage = "分类名称 不能超过 32 个字符"), EntityColumn(IsOnly = true)] + [Display(Name = "ClassName"), Description("分类名称"), MaxLength(32, ErrorMessage = "分类名称 不能超过 32 个字符"), EntityColumn(Unique = true)] public string ClassName { get; set; } /// diff --git a/Tiobon.Core.Model/Entity/AttributeManager/EntityAttribute.cs b/Tiobon.Core.Model/Entity/AttributeManager/EntityAttribute.cs index 8fc4aa57..8251cf59 100644 --- a/Tiobon.Core.Model/Entity/AttributeManager/EntityAttribute.cs +++ b/Tiobon.Core.Model/Entity/AttributeManager/EntityAttribute.cs @@ -35,6 +35,6 @@ /// /// 是否校验唯一性 /// - public bool IsOnly { get; set; } + public bool Unique { get; set; } } } diff --git a/Tiobon.Core.Model/Models/Ghre/Ghre_CourseScene.cs b/Tiobon.Core.Model/Models/Ghre/Ghre_CourseScene.cs index 33084a6a..d786d429 100644 --- a/Tiobon.Core.Model/Models/Ghre/Ghre_CourseScene.cs +++ b/Tiobon.Core.Model/Models/Ghre/Ghre_CourseScene.cs @@ -31,13 +31,13 @@ namespace Tiobon.Core.Model.Models /// /// 场景编号 /// - [Display(Name = "SceneNo"), Description("场景编号"), MaxLength(32, ErrorMessage = "场景编号 不能超过 32 个字符"), EntityColumn(IsOnly = true)] + [Display(Name = "SceneNo"), Description("场景编号"), MaxLength(32, ErrorMessage = "场景编号 不能超过 32 个字符"), EntityColumn(Unique = true)] public string SceneNo { get; set; } /// /// 场景名称 /// - [Display(Name = "SceneName"), Description("场景名称"), MaxLength(32, ErrorMessage = "场景名称 不能超过 32 个字符"), EntityColumn(IsOnly = true)] + [Display(Name = "SceneName"), Description("场景名称"), MaxLength(32, ErrorMessage = "场景名称 不能超过 32 个字符"), EntityColumn(Unique = true)] public string SceneName { get; set; } /// diff --git a/Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaper.cs b/Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaper.cs index 7b3ad19a..e9a8ed56 100644 --- a/Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaper.cs +++ b/Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaper.cs @@ -32,7 +32,7 @@ namespace Tiobon.Core.Model.Models /// /// 试卷编号 /// - [Display(Name = "PaperNo"), Description("试卷编号"), MaxLength(32, ErrorMessage = "试卷编号 不能超过 32 个字符"), EntityColumn(IsOnly = true)] + [Display(Name = "PaperNo"), Description("试卷编号"), MaxLength(32, ErrorMessage = "试卷编号 不能超过 32 个字符"), EntityColumn(Unique = true)] public string PaperNo { get; set; } ///