修改数据提交唯一性校验

master
xiaochanghai 1 year ago
parent 8f73fb9540
commit 671f4bddd3
  1. 2
      Tiobon.Core.Api/Tiobon.Core.Model.xml
  2. 2
      Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs
  3. 4
      Tiobon.Core.Model/Base/Ghre/Ghre_Course.Dto.Base.cs
  4. 4
      Tiobon.Core.Model/Base/Ghre/Ghre_CourseClass.Dto.Base.cs
  5. 2
      Tiobon.Core.Model/Entity/AttributeManager/EntityAttribute.cs
  6. 4
      Tiobon.Core.Model/Models/Ghre/Ghre_CourseScene.cs
  7. 2
      Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaper.cs

@ -3347,7 +3347,7 @@
表中文名
</summary>
</member>
<member name="P:Tiobon.Core.Model.EntityColumnAttribute.IsOnly">
<member name="P:Tiobon.Core.Model.EntityColumnAttribute.Unique">
<summary>
是否校验唯一性
</summary>

@ -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);

@ -29,13 +29,13 @@ namespace Tiobon.Core.Model.Models
/// <summary>
/// 课程编号
/// </summary>
[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; }
/// <summary>
/// 课程名称
/// </summary>
[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; }
/// <summary>

@ -29,13 +29,13 @@ namespace Tiobon.Core.Model.Models
/// <summary>
/// 分类编号
/// </summary>
[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; }
/// <summary>
/// 分类名称
/// </summary>
[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; }
/// <summary>

@ -35,6 +35,6 @@
/// <summary>
/// 是否校验唯一性
/// </summary>
public bool IsOnly { get; set; }
public bool Unique { get; set; }
}
}

@ -31,13 +31,13 @@ namespace Tiobon.Core.Model.Models
/// <summary>
/// 场景编号
/// </summary>
[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; }
/// <summary>
/// 场景名称
/// </summary>
[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; }
/// <summary>

@ -32,7 +32,7 @@ namespace Tiobon.Core.Model.Models
/// <summary>
/// 试卷编号
/// </summary>
[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; }
/// <summary>

Loading…
Cancel
Save