90 lines
2.7 KiB
C#
90 lines
2.7 KiB
C#
using Learn.Archives.Core.Model.Dto;
|
|
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 string SchoolName { get; set; }
|
|
/// <summary>
|
|
/// 年级
|
|
/// </summary>
|
|
public 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 SolutionEnd { get; set; }
|
|
|
|
/// <summary>
|
|
/// 反馈问题
|
|
/// <para>数据库JSON字段!!!</para>
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = true, IsJson = true,ColumnDataType ="text")]
|
|
public FeedbackQuestionsDto[]? FeedbackQuestions { get; set; }
|
|
/// <summary>
|
|
/// 解决方案的记录
|
|
/// <para>数据库JSON字段!!!</para>
|
|
/// </summary>
|
|
[SugarColumn(IsNullable = true, IsJson = true, ColumnDataType = "text")]
|
|
public SolutionRecordDto? 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 long FeedbackCount => FeedbackQuestions?.Count() ?? 0;
|
|
/// <summary>
|
|
/// 反馈问题已解决数量
|
|
/// </summary>
|
|
public long SolveFeedbackCount => FeedbackQuestions?
|
|
.Count(s => s.EndTime != null) ?? 0;
|
|
|
|
/// <summary>
|
|
/// 开展过座谈
|
|
/// </summary>
|
|
public bool IsDiscussion => !string.IsNullOrEmpty(Discussion);
|
|
/// <summary>
|
|
/// 开展过班会
|
|
/// </summary>
|
|
public bool IsClassMeeting => !string.IsNullOrEmpty(ClassMeeting);
|
|
|
|
}
|
|
}
|