//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2022-08-17 14:36:04
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
using System.Linq;
namespace IRaCIS.Core.Domain.Models
{
///
/// 项目阅片问题
///
[Table("ReadingTableQuestionTrial")]
public class ReadingTableQuestionTrial : Entity, IAuditAdd
{
///
/// TrialId
///
public Guid TrialId { get; set; }
///
/// 项目问题的Id ReadingQuestionTrial的id
///
public Guid ReadingQuestionId { get; set; }
///
/// Type
///
public string Type { get; set; } = string.Empty;
///
/// ParentId
///
public Guid? ParentId { get; set; }
///
/// ParentTriggerValue
///
public string ParentTriggerValue { get; set; } = string.Empty;
///
/// QuestionName
///
public string QuestionName { get; set; } = string.Empty;
///
/// IsRequired
///
public IsRequired IsRequired { get; set; }
///
/// ShowOrder
///
public int ShowOrder { get; set; }
///
/// TypeValue
///
public string TypeValue { get; set; } = string.Empty;
///
/// IsEnable
///
public bool IsEnable { get; set; }
///
/// CreateTime
///
public DateTime CreateTime { get; set; }
///
/// CreateUserId
///
public Guid CreateUserId { get; set; }
///
/// Remark
///
public string Remark { get; set; } = string.Empty;
///
/// RelevanceId
///
public Guid? RelevanceId { get; set; }
///
/// RelevanceValue
///
public string RelevanceValue { get; set; } = string.Empty;
///
/// ShowQuestion
///
public int ShowQuestion { get; set; }
///
/// MaxRowCount
///
public int? MaxRowCount { get; set; }
///
/// DataTableName
///
public string DataTableName { get; set; } = string.Empty;
///
/// DataTableColumn
///
public string DataTableColumn { get; set; }
///
/// TableQuestionType
///
public TableQuestionType? TableQuestionType { get; set; }
///
/// DependParentId
///
public Guid? DependParentId { get; set; }
///
/// IsDepend
///
public IsDepend IsDepend { get; set; }
///
/// 项目标准Id
///
public Guid TrialCriterionId { get; set; }
///
/// 问题标识
///
public QuestionMark? QuestionMark { get; set; }
///
/// 字典code
///
public string DictionaryCode { get; set; } = string.Empty;
///
/// 数值类型
///
public ValueOfType? ValueType { get; set; }
///
/// 单位
///
public ValueUnit? Unit { get; set; }
///
/// 自定义单位
///
public string CustomUnit { get; set; } = string.Empty;
///
/// 自定义计算标记
///
public CustomCalculateMark? CustomCalculateMark { get; set; }
///
/// 限制编辑
///
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
///
/// 自定义计算标记
///
public string CalculateQuestions { get; set; } = "[]";
///
/// 问题英文名称
///
public string QuestionEnName { get; set; } = string.Empty;
///
/// 数据来源
///
public DataSources DataSource { get; set; } = DataSources.ManualEntry;
[JsonIgnore]
[ForeignKey("DependParentId")]
public ReadingTableQuestionTrial DependParentQuestion { get; set; }
[JsonIgnore]
[ForeignKey("ReadingQuestionId")]
public ReadingQuestionTrial ReadingQuestionTrial { get; set; }
///
/// 复制病灶的时候 是否复制这个问题
///
public bool IsCopy { get; set; } = false;
[NotMapped]
public List ParentTriggerValueList
{
get
{
try
{
return this.ParentTriggerValue.Split(',').ToList();
}
catch (Exception)
{
return new List();
}
}
}
[NotMapped]
public List RelevanceValueList
{
get
{
try
{
return this.RelevanceValue.Split(',').ToList();
}
catch (Exception)
{
return new List();
}
}
}
[NotMapped]
public List CalculateQuestionList
{
get
{
try
{
var result = JsonConvert.DeserializeObject>(this.CalculateQuestions);
return result == null ? new List() : result;
}
catch (Exception)
{
return new List();
}
}
}
}
}