修改 IuserInfo位置

This commit is contained in:
2022-04-12 15:33:12 +08:00
parent 84588c1b2f
commit d88621f2a9
13 changed files with 51 additions and 23 deletions
+24 -8
View File
@@ -9,21 +9,26 @@ namespace IRaCIS.Core.Domain.Models
[Table("Dictionary")]
public partial class Dictionary : Entity, IAuditUpdate, IAuditAdd
{
private readonly IUserInfo _userInfo;
public List<DoctorDictionary> DoctorDicRelationList { get; set; } = new List<DoctorDictionary>();
//³£¹æµ÷ÓÃ
public Dictionary()
{
}
public Dictionary(IUserInfo userInfo )
{
_userInfo = userInfo;
}
[StringLength(50)]
public string KeyName { get; set; } = string.Empty;
[StringLength(100)]
[Column("Value")]
public string Value { get; set; } = string.Empty;
[StringLength(100)]
[Column("ValueCN")]
public string ValueCN { get; set; } = string.Empty;
@@ -59,5 +64,16 @@ namespace IRaCIS.Core.Domain.Models
[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;
}
}