102 lines
2.5 KiB
C#
102 lines
2.5 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using LearningOfficer.OA.Common.Enums;
|
||
using SqlSugar;
|
||
|
||
namespace LearningOfficer.OA.Core.Entities.OA.SystemInfo
|
||
{
|
||
/// <summary>
|
||
/// 字典表
|
||
///</summary>
|
||
[SugarTable("sys_parameter")]
|
||
public class SysParameter : BaseEntity
|
||
{
|
||
|
||
|
||
|
||
|
||
/// <summary>
|
||
/// 备 注:父级id,默认0,0时无父级
|
||
/// 默认值:
|
||
///</summary>
|
||
[SugarColumn(ColumnName = "pid")]
|
||
public long Pid { get; set; }
|
||
|
||
|
||
/// <summary>
|
||
/// 备 注:参数名称
|
||
/// 默认值:
|
||
///</summary>
|
||
[SugarColumn(ColumnName = "p_name")]
|
||
public string PName { get; set; } = null!;
|
||
|
||
|
||
/// <summary>
|
||
/// 备 注:枚举值,不可重复,自定义 或 直接生成,后续业务关联也是关联此字段
|
||
/// 默认值:
|
||
///</summary>
|
||
[SugarColumn(ColumnName = "p_value")]
|
||
public long PValue { get; set; }
|
||
|
||
|
||
/// <summary>
|
||
/// 备 注:排序,默认0
|
||
/// 默认值:
|
||
///</summary>
|
||
[SugarColumn(ColumnName = "sort")]
|
||
public int Sort { get; set; }
|
||
|
||
|
||
/// <summary>
|
||
/// 备 注:是否纳入问题记录。0否,1是
|
||
/// 默认值:
|
||
///</summary>
|
||
[SugarColumn(ColumnName = "is_question")]
|
||
public bool IsQuestion { get; set; }
|
||
|
||
|
||
/// <summary>
|
||
/// 备 注:问题类别。0无(不是问题时默认0),1学生、2教师
|
||
/// 默认值:
|
||
///</summary>
|
||
[SugarColumn(ColumnName = "question_type")]
|
||
public QuestionType QuestionType { get; set; }
|
||
|
||
/// <summary>
|
||
/// 备 注: 1=单选,2=多选
|
||
/// 默认值:
|
||
///</summary>
|
||
[SugarColumn(ColumnName = "selection_mode")]
|
||
public int? SelectionMode { get; set; }
|
||
|
||
/// <summary>
|
||
/// 备 注:是否必填项
|
||
/// 默认值:
|
||
///</summary>
|
||
[SugarColumn(ColumnName = "is_required_selection")]
|
||
public bool IsRequiredSelection { get; set; }
|
||
|
||
|
||
[SugarColumn(IsIgnore = true)]
|
||
public List<SysParameter> Child { get; set; }
|
||
|
||
[SugarColumn(IsIgnore = true)]
|
||
public SysParameter? Parent { get; set; }
|
||
|
||
/// <summary>
|
||
/// 下级是否为选项
|
||
/// </summary>
|
||
[SugarColumn(IsIgnore = true)]
|
||
public bool ChildrenIsOption
|
||
{
|
||
get
|
||
{
|
||
return SelectionMode.HasValue;
|
||
}
|
||
}
|
||
|
||
|
||
}
|
||
|
||
} |