diff --git a/Tiobon.Core.Api/Controllers/Ghre/Ghre_ExamPaperController.cs b/Tiobon.Core.Api/Controllers/Ghre/Ghre_ExamPaperController.cs new file mode 100644 index 00000000..cf1522fb --- /dev/null +++ b/Tiobon.Core.Api/Controllers/Ghre/Ghre_ExamPaperController.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_ExamPaperController : BaseController +{ + public Ghre_ExamPaperController(IGhre_ExamPaperServices service) : base(service) + { + } +} \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index 9b2cbcf0..877e7596 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -573,6 +573,144 @@ 预留字段12 + + + 试卷 (Dto.Base) + + + + + 试卷编号 + + + + + 试卷名称 + + + + + 答题时长 + + + + + 评分方式 + + + + + 卷面总分 + + + + + 及格分 + + + + + 重考次数 + + + + + 关联类型 + + + + + 关联ID + + + 关联次数 + + + + + 封面图片URL + + + + + 试卷风格 + + + + + 状态 + + + + + 备注 + + + + + 默认标志 + + + + + 预留字段1 + + + + + 预留字段2 + + + + + 预留字段3 + + + + + 预留字段4 + + + + + 预留字段5 + + + + + 预留字段6 + + + + + 预留字段7 + + + + + 预留字段8 + + + + + 预留字段9 + + + + + 预留字段10 + + + + + 预留字段11 + + + + + 预留字段12 + + 题目 (Dto.Base) @@ -977,6 +1115,11 @@ 课程场景 (Dto.EditInput) + + + 试卷 (Dto.EditInput) + + 题目 (Dto.EditInput) @@ -1022,6 +1165,11 @@ 课程场景 (Dto.InsertInput) + + + 试卷 (Dto.InsertInput) + + 题目 (Dto.InsertInput) @@ -1781,6 +1929,146 @@ 预留字段12 + + + 试卷 (Model) + + + + + 试卷编号 + + + + + 试卷名称 + + + + + 答题时长 + + + + + 评分方式 + + + + + 卷面总分 + + + + + 及格分 + + + + + 重考次数 + + + + + 关联类型 + + + + + 关联ID + + + + + 关联次数 + + + + + 封面图片URL + + + + + 试卷风格 + + + + + 状态 + + + + + 备注 + + + + + 默认标志 + + + + + 预留字段1 + + + + + 预留字段2 + + + + + 预留字段3 + + + + + 预留字段4 + + + + + 预留字段5 + + + + + 预留字段6 + + + + + 预留字段7 + + + + + 预留字段8 + + + + + 预留字段9 + + + + + 预留字段10 + + + + + 预留字段11 + + + + + 预留字段12 + + 题目 (Model) @@ -2999,6 +3287,11 @@ 课程场景(Dto.View) + + + 试卷(Dto.View) + + 题目(Dto.View) diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 121a599f..ac0b42c8 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -510,6 +510,11 @@ 课程场景(Controller) + + + 试卷(Controller) + + 题目答案(Controller) diff --git a/Tiobon.Core.IServices/Ghre/IGhre_ExamPaperServices.cs b/Tiobon.Core.IServices/Ghre/IGhre_ExamPaperServices.cs new file mode 100644 index 00000000..8fbaf677 --- /dev/null +++ b/Tiobon.Core.IServices/Ghre/IGhre_ExamPaperServices.cs @@ -0,0 +1,12 @@ +using Tiobon.Core.IServices.BASE; +using Tiobon.Core.Model.Models; + +namespace Tiobon.Core.IServices +{ + /// + /// 试卷(自定义服务接口) + /// + public interface IGhre_ExamPaperServices :IBaseServices + { + } +} \ No newline at end of file diff --git a/Tiobon.Core.Model/Base/Ghre/Ghre_ExamPaper.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghre/Ghre_ExamPaper.Dto.Base.cs new file mode 100644 index 00000000..27967b43 --- /dev/null +++ b/Tiobon.Core.Model/Base/Ghre/Ghre_ExamPaper.Dto.Base.cs @@ -0,0 +1,184 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghre_ExamPaper.cs +* +*功 能: N / A +* 类 名: Ghre_ExamPaper +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/4/29 11:50:29 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Tiobon.Core.Model.Models +{ + + /// + /// 试卷 (Dto.Base) + /// + public class Ghre_ExamPaperBase + { + + /// + /// 试卷编号 + /// + [Display(Name = "PaperNo"), Description("试卷编号"), MaxLength(32, ErrorMessage = "试卷编号 不能超过 32 个字符")] + public string PaperNo { get; set; } + + /// + /// 试卷名称 + /// + [Display(Name = "PaperName"), Description("试卷名称"), MaxLength(32, ErrorMessage = "试卷名称 不能超过 32 个字符")] + public string PaperName { get; set; } + + /// + /// 答题时长 + /// + public int? AnswerTime { get; set; } + + /// + /// 评分方式 + /// + [Display(Name = "ScoreMethod"), Description("评分方式"), MaxLength(32, ErrorMessage = "评分方式 不能超过 32 个字符")] + public string ScoreMethod { get; set; } + + /// + /// 卷面总分 + /// + [Display(Name = "TotalScore"), Description("卷面总分"), Column(TypeName = "decimal(20,2)")] + public decimal? TotalScore { get; set; } + + /// + /// 及格分 + /// + [Display(Name = "PassScore"), Description("及格分"), Column(TypeName = "decimal(20,2)")] + public decimal? PassScore { get; set; } + + /// + /// 重考次数 + /// + public int? RetakeTimes { get; set; } + + /// + /// 关联类型 + /// + [Display(Name = "LinkType"), Description("关联类型"), MaxLength(32, ErrorMessage = "关联类型 不能超过 32 个字符")] + public string LinkType { get; set; } + + /// + /// 关联ID + /// + + /// + /// 关联次数 + /// + public int? LinkTimes { get; set; } + + /// + /// 封面图片URL + /// + [Display(Name = "CoverUrl"), Description("封面图片URL"), MaxLength(64, ErrorMessage = "封面图片URL 不能超过 64 个字符")] + public string CoverUrl { get; set; } + + /// + /// 试卷风格 + /// + [Display(Name = "Style"), Description("试卷风格"), MaxLength(32, ErrorMessage = "试卷风格 不能超过 32 个字符")] + public string Style { get; set; } + + /// + /// 状态 + /// + [Display(Name = "Status"), Description("状态"), MaxLength(32, ErrorMessage = "状态 不能超过 32 个字符")] + public string Status { get; set; } + + /// + /// 备注 + /// + [Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")] + public string RemarkSz { 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_ExamPaper.Dto.EditInput.cs b/Tiobon.Core.Model/Edit/Ghre/Ghre_ExamPaper.Dto.EditInput.cs new file mode 100644 index 00000000..7a891aea --- /dev/null +++ b/Tiobon.Core.Model/Edit/Ghre/Ghre_ExamPaper.Dto.EditInput.cs @@ -0,0 +1,27 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghre_ExamPaper.cs +* +*功 能: N / A +* 类 名: Ghre_ExamPaper +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/4/29 11:50:29 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models +{ + + /// + /// 试卷 (Dto.EditInput) + /// + public class EditGhre_ExamPaperInput : Ghre_ExamPaperBase + { + } +} diff --git a/Tiobon.Core.Model/Insert/Ghre/Ghre_ExamPaper.Dto.InsertInput.cs b/Tiobon.Core.Model/Insert/Ghre/Ghre_ExamPaper.Dto.InsertInput.cs new file mode 100644 index 00000000..9dbdbcf6 --- /dev/null +++ b/Tiobon.Core.Model/Insert/Ghre/Ghre_ExamPaper.Dto.InsertInput.cs @@ -0,0 +1,27 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghre_ExamPaper.cs +* +*功 能: N / A +* 类 名: Ghre_ExamPaper +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/4/29 11:50:29 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models +{ + + /// + /// 试卷 (Dto.InsertInput) + /// + public class InsertGhre_ExamPaperInput : Ghre_ExamPaperBase + { + } +} diff --git a/Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaper.cs b/Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaper.cs new file mode 100644 index 00000000..7b3ad19a --- /dev/null +++ b/Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaper.cs @@ -0,0 +1,187 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghre_ExamPaper.cs +* +*功 能: N / A +* 类 名: Ghre_ExamPaper +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/4/29 11:50:29 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using SqlSugar; + +namespace Tiobon.Core.Model.Models +{ + + /// + /// 试卷 (Model) + /// + [SugarTable("Ghre_ExamPaper", "Ghre_ExamPaper"), Entity(TableCnName = "试卷", TableName = "Ghre_ExamPaper")] + public class Ghre_ExamPaper : BasePoco + { + + /// + /// 试卷编号 + /// + [Display(Name = "PaperNo"), Description("试卷编号"), MaxLength(32, ErrorMessage = "试卷编号 不能超过 32 个字符"), EntityColumn(IsOnly = true)] + public string PaperNo { get; set; } + + /// + /// 试卷名称 + /// + [Display(Name = "PaperName"), Description("试卷名称"), MaxLength(32, ErrorMessage = "试卷名称 不能超过 32 个字符")] + public string PaperName { get; set; } + + /// + /// 答题时长 + /// + public int? AnswerTime { get; set; } + + /// + /// 评分方式 + /// + [Display(Name = "ScoreMethod"), Description("评分方式"), MaxLength(32, ErrorMessage = "评分方式 不能超过 32 个字符")] + public string ScoreMethod { get; set; } + + /// + /// 卷面总分 + /// + [Display(Name = "TotalScore"), Description("卷面总分"), Column(TypeName = "decimal(20,2)")] + public decimal? TotalScore { get; set; } + + /// + /// 及格分 + /// + [Display(Name = "PassScore"), Description("及格分"), Column(TypeName = "decimal(20,2)")] + public decimal? PassScore { get; set; } + + /// + /// 重考次数 + /// + public int? RetakeTimes { get; set; } + + /// + /// 关联类型 + /// + [Display(Name = "LinkType"), Description("关联类型"), MaxLength(32, ErrorMessage = "关联类型 不能超过 32 个字符")] + public string LinkType { get; set; } + + /// + /// 关联ID + /// + public long? LinkId { get; set; } + + /// + /// 关联次数 + /// + public int? LinkTimes { get; set; } + + /// + /// 封面图片URL + /// + [Display(Name = "CoverUrl"), Description("封面图片URL"), MaxLength(64, ErrorMessage = "封面图片URL 不能超过 64 个字符")] + public string CoverUrl { get; set; } + + /// + /// 试卷风格 + /// + [Display(Name = "Style"), Description("试卷风格"), MaxLength(32, ErrorMessage = "试卷风格 不能超过 32 个字符")] + public string Style { get; set; } + + /// + /// 状态 + /// + [Display(Name = "Status"), Description("状态"), MaxLength(32, ErrorMessage = "状态 不能超过 32 个字符")] + public string Status { get; set; } + + /// + /// 备注 + /// + [Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")] + public string RemarkSz { 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_ExamPaper.Dto.View.cs b/Tiobon.Core.Model/View/Ghre/Ghre_ExamPaper.Dto.View.cs new file mode 100644 index 00000000..dce492a2 --- /dev/null +++ b/Tiobon.Core.Model/View/Ghre/Ghre_ExamPaper.Dto.View.cs @@ -0,0 +1,27 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghre_ExamPaper.cs +* +*功 能: N / A +* 类 名: Ghre_ExamPaper +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/4/29 11:50:29 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models +{ + + /// + /// 试卷(Dto.View) + /// + public class Ghre_ExamPaperDto : Ghre_ExamPaper + { + } +} diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs new file mode 100644 index 00000000..e5374bad --- /dev/null +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.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_ExamPaperServices : BaseServices, IGhre_ExamPaperServices + { + private readonly IBaseRepository _dal; + public Ghre_ExamPaperServices(IBaseRepository dal) + { + this._dal = dal; + base.BaseDal = dal; + } + } +} \ No newline at end of file