新增 部分数据库模型
This commit is contained in:
parent
031272ed6b
commit
f7291f3486
|
|
@ -38,9 +38,11 @@ namespace Learn.Archives.Core.Common
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var projectName = Assembly.GetExecutingAssembly().GetName().Name;
|
||||||
Assemblies = ExpandFunction.GetAssemblies();
|
Assemblies = ExpandFunction.GetAssemblies();
|
||||||
var assembliesType = Assemblies.Where(s => s.FullName.Contains("Archives")).SelectMany(s => s.ExportedTypes
|
var assembliesType = Assemblies
|
||||||
.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass && u.IsDefined(typeof(SugarTable), false)));
|
//.Where(s => s.FullName.Contains(projectName))
|
||||||
|
.SelectMany(s => s.ExportedTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass && u.IsDefined(typeof(SugarTable), false)));
|
||||||
DbMatserType = assembliesType
|
DbMatserType = assembliesType
|
||||||
.Where(u => u.GetInterfaces().Contains(typeof(IDB)));
|
.Where(u => u.GetInterfaces().Contains(typeof(IDB)));
|
||||||
UserCenterType = assembliesType
|
UserCenterType = assembliesType
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
using Learn.Archives.Core.Model.Enum;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Learn.Archives.Core.Model.Dto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 解决方案记录
|
||||||
|
/// </summary>
|
||||||
|
public class SolutionRecordDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 需求+解决方案
|
||||||
|
/// </summary>
|
||||||
|
public string? Solution { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 解决方案是否已经完结
|
||||||
|
/// </summary>
|
||||||
|
public bool? SolutionEnd => !string.IsNullOrEmpty(EndRecord);
|
||||||
|
/// <summary>
|
||||||
|
/// 完结记录
|
||||||
|
/// </summary>
|
||||||
|
public string? EndRecord { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 执行记录
|
||||||
|
/// </summary>
|
||||||
|
public List<RecordDto> Record { get; set; }=new List<RecordDto>();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 执行记录
|
||||||
|
/// </summary>
|
||||||
|
public class RecordDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 执行记录
|
||||||
|
/// </summary>
|
||||||
|
public required string ExecutionRecords { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 执行时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime ExecutionTime { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 赴校信息-反馈问题
|
||||||
|
/// </summary>
|
||||||
|
public class FeedbackQuestionsDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈问题的类型
|
||||||
|
/// </summary>
|
||||||
|
public FeedbackQuestionTypeEnum QuestionType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 同类型下的序号 例如[问题1]
|
||||||
|
/// </summary>
|
||||||
|
public required string Sort { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 问题
|
||||||
|
/// </summary>
|
||||||
|
public required string Question { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 解决方案
|
||||||
|
/// </summary>
|
||||||
|
public string? Solution { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 解决时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EndTime { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 赴校问题
|
||||||
|
/// </summary>
|
||||||
|
public class BusinessQuestionDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 问题
|
||||||
|
/// </summary>
|
||||||
|
public required string Question { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 解决方案
|
||||||
|
/// </summary>
|
||||||
|
public string? Solution { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 解决时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EndTime { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Learn.Archives.Core.Model.Enum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 考试类型
|
||||||
|
/// </summary>
|
||||||
|
public enum ExamTypeEnum
|
||||||
|
{
|
||||||
|
周考 = 0,
|
||||||
|
月考 = 1,
|
||||||
|
期中考试 = 2,
|
||||||
|
期末考试 = 3,
|
||||||
|
会考 = 4,
|
||||||
|
限时作业 = 5,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Learn.Archives.Core.Model.Enum
|
||||||
|
{
|
||||||
|
public enum FeedbackQuestionTypeEnum
|
||||||
|
{
|
||||||
|
学校领导班子=1,
|
||||||
|
双师课堂=10,
|
||||||
|
设备=15,
|
||||||
|
学生=20,
|
||||||
|
其他=999,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Learn.Archives.Core.Model.Enum
|
||||||
|
{
|
||||||
|
public enum PositionTypeEnum
|
||||||
|
{
|
||||||
|
年级主任=100,
|
||||||
|
年级学科组组长= 110,
|
||||||
|
教导主任 = 120,
|
||||||
|
校长 = 130,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Learn.Archives.Core.Model.Enum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 试卷类型
|
||||||
|
/// </summary>
|
||||||
|
public enum TestPaperTypeEnum
|
||||||
|
{
|
||||||
|
统一考试=1,
|
||||||
|
本校考试 = 10,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
using Learn.Archives.Core.Model.Enum;
|
||||||
|
using Learn.Archives.Core.Model.Interface;
|
||||||
|
using SqlSugar;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text.Json;
|
||||||
|
using UserCenter.Model;
|
||||||
|
using UserCenter.Model.Enum;
|
||||||
|
using UserCenter.Model.Interface;
|
||||||
|
|
||||||
|
namespace Learn.Archives.Core.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 考试
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("exam")]
|
||||||
|
public class Exam : EntityBaseId, IDB
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 考试名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(Length = 20)]
|
||||||
|
public required string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 考试名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(Length = 20)]
|
||||||
|
public required string AdminName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 年级
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(Length = 12)]
|
||||||
|
public GradeEnum Level { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 试卷类型
|
||||||
|
/// </summary>
|
||||||
|
public TestPaperTypeEnum TestPaperType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 考试类型
|
||||||
|
/// </summary>
|
||||||
|
public ExamTypeEnum Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 划线分数
|
||||||
|
/// </summary>
|
||||||
|
public decimal ScoreLine { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 参与班级数量
|
||||||
|
/// </summary>
|
||||||
|
public int? ClassCount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||||
|
/// <summary>
|
||||||
|
/// 考试开始时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime StartTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 考试结束时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime EndTime { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
using Learn.Archives.Core.Model.Enum;
|
||||||
|
using Learn.Archives.Core.Model.Interface;
|
||||||
|
using SqlSugar;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text.Json;
|
||||||
|
using UserCenter.Model;
|
||||||
|
using UserCenter.Model.Enum;
|
||||||
|
using UserCenter.Model.Interface;
|
||||||
|
|
||||||
|
namespace Learn.Archives.Core.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 班级考试详情
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("examclassinfo")]
|
||||||
|
public class ExamClassInfo : EntityBaseId, IDB
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 考试Id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(Length = 20)]
|
||||||
|
public required string ExamId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 考试名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(Length = 20)]
|
||||||
|
public required string ExamName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 考试班级名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(Length = 20)]
|
||||||
|
public required string ClassName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 考试班级id
|
||||||
|
/// </summary>
|
||||||
|
public long ClassId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 考试班级所属学校ID
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(Length = 20)]
|
||||||
|
public required string SchoolName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 考试班级所属学校名称
|
||||||
|
/// </summary>
|
||||||
|
public long SchoolId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 年级
|
||||||
|
/// </summary>
|
||||||
|
public GradeLevelEnum GradeLevel { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 毕业年份 毕业届
|
||||||
|
/// </summary>
|
||||||
|
public int GradeYear { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 上线人数 考试排名
|
||||||
|
/// </summary>
|
||||||
|
public decimal OnLineRanking { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 上线率
|
||||||
|
/// </summary>
|
||||||
|
public decimal OnLineRate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 上线人数
|
||||||
|
/// </summary>
|
||||||
|
public int OnLineCount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 参加人数
|
||||||
|
/// </summary>
|
||||||
|
public int PeopleCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
using Learn.Archives.Core.Model.Interface;
|
||||||
|
using SqlSugar;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text.Json;
|
||||||
|
using UserCenter.Model;
|
||||||
|
using UserCenter.Model.Enum;
|
||||||
|
using UserCenter.Model.Interface;
|
||||||
|
|
||||||
|
namespace Learn.Archives.Core.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 年级
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("grade")]
|
||||||
|
public class Grade : EntityBaseId, IDB
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 年级
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(Length = 12)]
|
||||||
|
public GradeLevelEnum Level { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 毕业界
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(Length = 6)]
|
||||||
|
public int Year { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 学校名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(Length = 12)]
|
||||||
|
public required string SchoolName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 学校Id
|
||||||
|
/// </summary>
|
||||||
|
public long SchoolId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
using Learn.Archives.Core.Model.Interface;
|
||||||
|
using SqlSugar;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text.Json;
|
||||||
|
using UserCenter.Model;
|
||||||
|
using UserCenter.Model.Enum;
|
||||||
|
|
||||||
|
namespace Learn.Archives.Core.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 学校业务联系表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("schoolbusiness")]
|
||||||
|
public class SchoolBusiness : EntityBaseId, IDB
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 学校ID
|
||||||
|
/// </summary>
|
||||||
|
public long SchoolId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 学校名称
|
||||||
|
/// </summary>
|
||||||
|
public required string SchoolName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 年级
|
||||||
|
/// </summary>
|
||||||
|
public required string Grade { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 赴校时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime StartTime { get; set; } = DateTime.Now;
|
||||||
|
/// <summary>
|
||||||
|
/// 赴校备注
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsNullable = true)]
|
||||||
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈问题数量
|
||||||
|
/// </summary>
|
||||||
|
public long FeedbackCount{ get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈问题已解决数量
|
||||||
|
/// </summary>
|
||||||
|
public long SolveFeedbackCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 赴校问题已解决
|
||||||
|
/// </summary>
|
||||||
|
public long SolutionEnd { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 反馈问题
|
||||||
|
/// <para>序列化类型<see cref="Dto.FeedbackQuestionsDto[]"/></para>
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsNullable = true, ColumnDataType = "text")]
|
||||||
|
public string? FeedbackQuestions { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 解决方案的记录
|
||||||
|
/// <para>序列化类型<see cref="Dto.SolutionRecordDto"/></para>
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsNullable = true, ColumnDataType = "text")]
|
||||||
|
public string? SolutionRecord { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开展座谈
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsNullable =true,Length = 1000)]
|
||||||
|
public string? Discussion { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 开展班会
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsNullable = true, Length = 1000)]
|
||||||
|
public string? ClassMeeting { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 开展过座谈
|
||||||
|
/// </summary>
|
||||||
|
public bool IsDiscussion => !string.IsNullOrEmpty(Discussion);
|
||||||
|
/// <summary>
|
||||||
|
/// 开展过班会
|
||||||
|
/// </summary>
|
||||||
|
public bool IsClassMeeting => !string.IsNullOrEmpty(ClassMeeting);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
using Learn.Archives.Core.Model.Interface;
|
||||||
|
using SqlSugar;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text.Json;
|
||||||
|
using UserCenter.Model;
|
||||||
|
using UserCenter.Model.Enum;
|
||||||
|
|
||||||
|
namespace Learn.Archives.Core.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 学校业务赴校人员表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("schoolbusinessuser")]
|
||||||
|
public class SchoolBusinessUser : EntityBaseId, IDB
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 学校业务ID
|
||||||
|
/// </summary>
|
||||||
|
public long SchoolBusinessId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 人员Id
|
||||||
|
/// </summary>
|
||||||
|
public required long AdminId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 人员名称
|
||||||
|
/// </summary>
|
||||||
|
public required string AdminName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
//todo 与产品确认赴校信息的流程来设计表
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -10,10 +10,10 @@ namespace Learn.Archives.Core.Model
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户
|
/// 用户
|
||||||
/// <para>数据中心拓展用户</para>
|
/// <para>数据中心拓展学生</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarTable("userexpand")]
|
[SugarTable("student")]
|
||||||
public class UserExpand : EntityBaseId, IDB
|
public class Student : EntityBaseId, IDB
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户中心的id
|
/// 用户中心的id
|
||||||
Loading…
Reference in New Issue