using IRaCIS.Core.Domain.Share; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace IRaCIS.Core.Domain.Models { [Table("Dictionary")] public partial class Dictionary : Entity, IAuditUpdate, IAuditAdd { private readonly IUserInfo _userInfo; public List DoctorDicRelationList { get; set; } = new List(); //³£¹æµ÷Óà public Dictionary() { } public Dictionary(IUserInfo userInfo ) { _userInfo = userInfo; } [Column("Value")] public string Value { get; set; } = string.Empty; [Column("ValueCN")] public string ValueCN { get; set; } = string.Empty; [StringLength(512)] public string Description { get; set; } = string.Empty; public int ShowOrder { get; set; } public string ChildGroup { get; set; } public Guid UpdateUserId { get; set; } public DateTime UpdateTime { get; set; } public Guid CreateUserId { get; set; } public DateTime CreateTime { get; set; } public string Code { get; set; } public Guid? ParentId { get; set; } public bool IsEnable { get; set; } public bool IsConfig { get; set; } public Guid? ConfigTypeId { get; set; } [ForeignKey("ConfigTypeId")] public Dictionary ConfigDictionary { get; set; } [ForeignKey("ParentId")] public Dictionary Parent { get; set; } [StringLength(50)] public string KeyName { get; set; } = string.Empty; //²âÊÔ [NotMapped] public string MappedValue => _userInfo.IsEn_Us ? Value : ValueCN; } }