master
xiaochanghai 1 year ago
parent 136b03e2af
commit a3f1d137db
  1. 14
      Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseController.cs
  2. 12
      Tiobon.Core.IServices/Ghre/IGhre_CourseServices.cs
  3. 131
      Tiobon.Core.Model/Base/Ghre/Ghre_Course.Dto.Base.cs
  4. 27
      Tiobon.Core.Model/Edit/Ghre/Ghre_Course.Dto.EditInput.cs
  5. 27
      Tiobon.Core.Model/Insert/Ghre/Ghre_Course.Dto.InsertInput.cs
  6. 134
      Tiobon.Core.Model/Models/Ghre/Ghre_Course.cs
  7. 27
      Tiobon.Core.Model/View/Ghre/Ghre_Course.Dto.View.cs
  8. 21
      Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs

@ -0,0 +1,14 @@
namespace Tiobon.Core.Api.Controllers;
/// <summary>
/// 课程(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)]
public class Ghre_CourseController : BaseController<IGhre_CourseServices, Ghre_Course, Ghre_CourseDto, InsertGhre_CourseInput, EditGhre_CourseInput>
{
public Ghre_CourseController(IGhre_CourseServices service) : base(service)
{
}
}

@ -0,0 +1,12 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 课程(自定义服务接口)
/// </summary>
public interface IGhre_CourseServices :IBaseServices<Ghre_Course, Ghre_CourseDto, InsertGhre_CourseInput, EditGhre_CourseInput>
{
}
}

@ -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
{
/// <summary>
/// 课程 (Dto.Base)
/// </summary>
public class Ghre_CourseBase
{
/// <summary>
/// 课程名称
/// </summary>
[Display(Name = "CourseNo"), Description("课程名称"), MaxLength(32, ErrorMessage = "课程名称 不能超过 32 个字符")]
public string CourseNo { get; set; }
/// <summary>
/// 课程名称
/// </summary>
[Display(Name = "CourseName"), Description("课程名称"), MaxLength(32, ErrorMessage = "课程名称 不能超过 32 个字符")]
public string CourseName { get; set; }
/// <summary>
/// 课程分类ID
/// </summary>
/// <summary>
/// 备注
/// </summary>
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public string RemarkSz { get; set; }
/// <summary>
/// 排序
/// </summary>
public int? SortNo { get; set; }
/// <summary>
/// 默认标志
/// </summary>
public int? IsDefault { get; set; }
/// <summary>
/// 预留字段1
/// </summary>
[Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")]
public string Reverse1 { get; set; }
/// <summary>
/// 预留字段2
/// </summary>
[Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")]
public string Reverse2 { get; set; }
/// <summary>
/// 预留字段3
/// </summary>
[Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")]
public string Reverse3 { get; set; }
/// <summary>
/// 预留字段4
/// </summary>
[Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")]
public string Reverse4 { get; set; }
/// <summary>
/// 预留字段5
/// </summary>
[Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")]
public string Reverse5 { get; set; }
/// <summary>
/// 预留字段6
/// </summary>
[Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")]
public string Reverse6 { get; set; }
/// <summary>
/// 预留字段7
/// </summary>
[Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")]
public string Reverse7 { get; set; }
/// <summary>
/// 预留字段8
/// </summary>
[Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")]
public string Reverse8 { get; set; }
/// <summary>
/// 预留字段9
/// </summary>
[Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")]
public string Reverse9 { get; set; }
/// <summary>
/// 预留字段10
/// </summary>
[Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")]
public string Reverse10 { get; set; }
/// <summary>
/// 预留字段11
/// </summary>
public int? ReverseI1 { get; set; }
/// <summary>
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
}
}

@ -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
{
/// <summary>
/// 课程 (Dto.EditInput)
/// </summary>
public class EditGhre_CourseInput : Ghre_CourseBase
{
}
}

@ -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
{
/// <summary>
/// 课程 (Dto.InsertInput)
/// </summary>
public class InsertGhre_CourseInput : Ghre_CourseBase
{
}
}

@ -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
{
/// <summary>
/// 课程 (Model)
/// </summary>
[SugarTable("Ghre_Course", "Ghre_Course"), Entity(TableCnName = "课程", TableName = "Ghre_Course")]
public class Ghre_Course : BasePoco
{
/// <summary>
/// 课程名称
/// </summary>
[Display(Name = "CourseNo"), Description("课程名称"), MaxLength(32, ErrorMessage = "课程名称 不能超过 32 个字符")]
public string CourseNo { get; set; }
/// <summary>
/// 课程名称
/// </summary>
[Display(Name = "CourseName"), Description("课程名称"), MaxLength(32, ErrorMessage = "课程名称 不能超过 32 个字符")]
public string CourseName { get; set; }
/// <summary>
/// 课程分类ID
/// </summary>
public long? CourseClassId { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public string RemarkSz { get; set; }
/// <summary>
/// 排序
/// </summary>
public int? SortNo { get; set; }
/// <summary>
/// 默认标志
/// </summary>
public int? IsDefault { get; set; }
/// <summary>
/// 预留字段1
/// </summary>
[Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")]
public string Reverse1 { get; set; }
/// <summary>
/// 预留字段2
/// </summary>
[Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")]
public string Reverse2 { get; set; }
/// <summary>
/// 预留字段3
/// </summary>
[Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")]
public string Reverse3 { get; set; }
/// <summary>
/// 预留字段4
/// </summary>
[Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")]
public string Reverse4 { get; set; }
/// <summary>
/// 预留字段5
/// </summary>
[Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")]
public string Reverse5 { get; set; }
/// <summary>
/// 预留字段6
/// </summary>
[Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")]
public string Reverse6 { get; set; }
/// <summary>
/// 预留字段7
/// </summary>
[Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")]
public string Reverse7 { get; set; }
/// <summary>
/// 预留字段8
/// </summary>
[Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")]
public string Reverse8 { get; set; }
/// <summary>
/// 预留字段9
/// </summary>
[Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")]
public string Reverse9 { get; set; }
/// <summary>
/// 预留字段10
/// </summary>
[Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")]
public string Reverse10 { get; set; }
/// <summary>
/// 预留字段11
/// </summary>
public int? ReverseI1 { get; set; }
/// <summary>
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
}
}

@ -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
{
/// <summary>
/// 课程(Dto.View)
/// </summary>
public class Ghre_CourseDto : Ghre_Course
{
}
}

@ -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
{
/// <summary>
/// 课程 (服务)
/// </summary>
public class Ghre_CourseServices : BaseServices<Ghre_Course, Ghre_CourseDto, InsertGhre_CourseInput, EditGhre_CourseInput>, IGhre_CourseServices
{
private readonly IBaseRepository<Ghre_Course> _dal;
public Ghre_CourseServices(IBaseRepository<Ghre_Course> dal)
{
this._dal = dal;
base.BaseDal = dal;
}
}
}
Loading…
Cancel
Save