From a3f1d137db18987ca67de8745b54bd605590212b Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Sun, 28 Apr 2024 10:58:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Ghre/Ghre_CourseController.cs | 14 ++ .../Ghre/IGhre_CourseServices.cs | 12 ++ .../Base/Ghre/Ghre_Course.Dto.Base.cs | 131 +++++++++++++++++ .../Edit/Ghre/Ghre_Course.Dto.EditInput.cs | 27 ++++ .../Ghre/Ghre_Course.Dto.InsertInput.cs | 27 ++++ Tiobon.Core.Model/Models/Ghre/Ghre_Course.cs | 134 ++++++++++++++++++ .../View/Ghre/Ghre_Course.Dto.View.cs | 27 ++++ .../Ghre/Ghre_CourseServices.cs | 21 +++ 8 files changed, 393 insertions(+) create mode 100644 Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseController.cs create mode 100644 Tiobon.Core.IServices/Ghre/IGhre_CourseServices.cs create mode 100644 Tiobon.Core.Model/Base/Ghre/Ghre_Course.Dto.Base.cs create mode 100644 Tiobon.Core.Model/Edit/Ghre/Ghre_Course.Dto.EditInput.cs create mode 100644 Tiobon.Core.Model/Insert/Ghre/Ghre_Course.Dto.InsertInput.cs create mode 100644 Tiobon.Core.Model/Models/Ghre/Ghre_Course.cs create mode 100644 Tiobon.Core.Model/View/Ghre/Ghre_Course.Dto.View.cs create mode 100644 Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs diff --git a/Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseController.cs b/Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseController.cs new file mode 100644 index 00000000..aade0429 --- /dev/null +++ b/Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseController.cs @@ -0,0 +1,14 @@ +namespace Tiobon.Core.Api.Controllers; + +/// +/// 课程(Controller) +/// +[Route("api/[controller]")] +[ApiController, GlobalActionFilter] +[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)] +public class Ghre_CourseController : BaseController +{ + public Ghre_CourseController(IGhre_CourseServices service) : base(service) + { + } +} \ No newline at end of file diff --git a/Tiobon.Core.IServices/Ghre/IGhre_CourseServices.cs b/Tiobon.Core.IServices/Ghre/IGhre_CourseServices.cs new file mode 100644 index 00000000..c2146532 --- /dev/null +++ b/Tiobon.Core.IServices/Ghre/IGhre_CourseServices.cs @@ -0,0 +1,12 @@ +using Tiobon.Core.IServices.BASE; +using Tiobon.Core.Model.Models; + +namespace Tiobon.Core.IServices +{ + /// + /// 课程(自定义服务接口) + /// + public interface IGhre_CourseServices :IBaseServices + { + } +} \ No newline at end of file diff --git a/Tiobon.Core.Model/Base/Ghre/Ghre_Course.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghre/Ghre_Course.Dto.Base.cs new file mode 100644 index 00000000..166a9e35 --- /dev/null +++ b/Tiobon.Core.Model/Base/Ghre/Ghre_Course.Dto.Base.cs @@ -0,0 +1,131 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghre_Course.cs +* +*功 能: N / A +* 类 名: Ghre_Course +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/4/28 10:58:17 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace Tiobon.Core.Model.Models +{ + + /// + /// 课程 (Dto.Base) + /// + public class Ghre_CourseBase + { + + /// + /// 课程名称 + /// + [Display(Name = "CourseNo"), Description("课程名称"), MaxLength(32, ErrorMessage = "课程名称 不能超过 32 个字符")] + public string CourseNo { get; set; } + + /// + /// 课程名称 + /// + [Display(Name = "CourseName"), Description("课程名称"), MaxLength(32, ErrorMessage = "课程名称 不能超过 32 个字符")] + public string CourseName { get; set; } + + /// + /// 课程分类ID + /// + + /// + /// 备注 + /// + [Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")] + public string RemarkSz { get; set; } + + /// + /// 排序 + /// + public int? SortNo { get; set; } + + /// + /// 默认标志 + /// + public int? IsDefault { get; set; } + + /// + /// 预留字段1 + /// + [Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")] + public string Reverse1 { get; set; } + + /// + /// 预留字段2 + /// + [Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")] + public string Reverse2 { get; set; } + + /// + /// 预留字段3 + /// + [Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")] + public string Reverse3 { get; set; } + + /// + /// 预留字段4 + /// + [Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")] + public string Reverse4 { get; set; } + + /// + /// 预留字段5 + /// + [Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")] + public string Reverse5 { get; set; } + + /// + /// 预留字段6 + /// + [Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")] + public string Reverse6 { get; set; } + + /// + /// 预留字段7 + /// + [Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")] + public string Reverse7 { get; set; } + + /// + /// 预留字段8 + /// + [Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")] + public string Reverse8 { get; set; } + + /// + /// 预留字段9 + /// + [Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")] + public string Reverse9 { get; set; } + + /// + /// 预留字段10 + /// + [Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")] + public string Reverse10 { get; set; } + + /// + /// 预留字段11 + /// + public int? ReverseI1 { get; set; } + + /// + /// 预留字段12 + /// + public int? ReverseI2 { get; set; } + } +} diff --git a/Tiobon.Core.Model/Edit/Ghre/Ghre_Course.Dto.EditInput.cs b/Tiobon.Core.Model/Edit/Ghre/Ghre_Course.Dto.EditInput.cs new file mode 100644 index 00000000..eda67f47 --- /dev/null +++ b/Tiobon.Core.Model/Edit/Ghre/Ghre_Course.Dto.EditInput.cs @@ -0,0 +1,27 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghre_Course.cs +* +*功 能: N / A +* 类 名: Ghre_Course +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/4/28 10:58:17 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models +{ + + /// + /// 课程 (Dto.EditInput) + /// + public class EditGhre_CourseInput : Ghre_CourseBase + { + } +} diff --git a/Tiobon.Core.Model/Insert/Ghre/Ghre_Course.Dto.InsertInput.cs b/Tiobon.Core.Model/Insert/Ghre/Ghre_Course.Dto.InsertInput.cs new file mode 100644 index 00000000..87c8a893 --- /dev/null +++ b/Tiobon.Core.Model/Insert/Ghre/Ghre_Course.Dto.InsertInput.cs @@ -0,0 +1,27 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghre_Course.cs +* +*功 能: N / A +* 类 名: Ghre_Course +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/4/28 10:58:17 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models +{ + + /// + /// 课程 (Dto.InsertInput) + /// + public class InsertGhre_CourseInput : Ghre_CourseBase + { + } +} diff --git a/Tiobon.Core.Model/Models/Ghre/Ghre_Course.cs b/Tiobon.Core.Model/Models/Ghre/Ghre_Course.cs new file mode 100644 index 00000000..33a19f4d --- /dev/null +++ b/Tiobon.Core.Model/Models/Ghre/Ghre_Course.cs @@ -0,0 +1,134 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghre_Course.cs +* +*功 能: N / A +* 类 名: Ghre_Course +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/4/28 10:58:17 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using SqlSugar; + +namespace Tiobon.Core.Model.Models +{ + + /// + /// 课程 (Model) + /// + [SugarTable("Ghre_Course", "Ghre_Course"), Entity(TableCnName = "课程", TableName = "Ghre_Course")] + public class Ghre_Course : BasePoco + { + + /// + /// 课程名称 + /// + [Display(Name = "CourseNo"), Description("课程名称"), MaxLength(32, ErrorMessage = "课程名称 不能超过 32 个字符")] + public string CourseNo { get; set; } + + /// + /// 课程名称 + /// + [Display(Name = "CourseName"), Description("课程名称"), MaxLength(32, ErrorMessage = "课程名称 不能超过 32 个字符")] + public string CourseName { get; set; } + + /// + /// 课程分类ID + /// + public long? CourseClassId { get; set; } + + /// + /// 备注 + /// + [Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")] + public string RemarkSz { get; set; } + + /// + /// 排序 + /// + public int? SortNo { get; set; } + + /// + /// 默认标志 + /// + public int? IsDefault { get; set; } + + /// + /// 预留字段1 + /// + [Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")] + public string Reverse1 { get; set; } + + /// + /// 预留字段2 + /// + [Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")] + public string Reverse2 { get; set; } + + /// + /// 预留字段3 + /// + [Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")] + public string Reverse3 { get; set; } + + /// + /// 预留字段4 + /// + [Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")] + public string Reverse4 { get; set; } + + /// + /// 预留字段5 + /// + [Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")] + public string Reverse5 { get; set; } + + /// + /// 预留字段6 + /// + [Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")] + public string Reverse6 { get; set; } + + /// + /// 预留字段7 + /// + [Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")] + public string Reverse7 { get; set; } + + /// + /// 预留字段8 + /// + [Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")] + public string Reverse8 { get; set; } + + /// + /// 预留字段9 + /// + [Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")] + public string Reverse9 { get; set; } + + /// + /// 预留字段10 + /// + [Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")] + public string Reverse10 { get; set; } + + /// + /// 预留字段11 + /// + public int? ReverseI1 { get; set; } + + /// + /// 预留字段12 + /// + public int? ReverseI2 { get; set; } + } +} diff --git a/Tiobon.Core.Model/View/Ghre/Ghre_Course.Dto.View.cs b/Tiobon.Core.Model/View/Ghre/Ghre_Course.Dto.View.cs new file mode 100644 index 00000000..1a99f1e1 --- /dev/null +++ b/Tiobon.Core.Model/View/Ghre/Ghre_Course.Dto.View.cs @@ -0,0 +1,27 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghre_Course.cs +* +*功 能: N / A +* 类 名: Ghre_Course +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/4/28 10:58:17 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models +{ + + /// + /// 课程(Dto.View) + /// + public class Ghre_CourseDto : Ghre_Course + { + } +} diff --git a/Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs b/Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs new file mode 100644 index 00000000..27830ae2 --- /dev/null +++ b/Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs @@ -0,0 +1,21 @@ + +using Tiobon.Core.IServices; +using Tiobon.Core.Model.Models; +using Tiobon.Core.Services.BASE; +using Tiobon.Core.IRepository.Base; + +namespace Tiobon.Core.Services +{ + /// + /// 课程 (服务) + /// + public class Ghre_CourseServices : BaseServices, IGhre_CourseServices + { + private readonly IBaseRepository _dal; + public Ghre_CourseServices(IBaseRepository dal) + { + this._dal = dal; + base.BaseDal = dal; + } + } +} \ No newline at end of file