整理文件夹

This commit is contained in:
2024-10-22 15:30:38 +08:00
parent 38b4268c67
commit 06cb92b7e0
15 changed files with 19 additions and 27 deletions
@@ -0,0 +1,63 @@
using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Application.Helper
{
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = false)]
public class DictionaryTranslateAttribute : Attribute
{
public string DicParentCode { get; set; }
public DicDataTypeEnum DataTypeEnum { get; set; }
public CriterionType? CriterionType { get; set; }
//是否翻译依赖其他属性
public bool IsTranslateDenpendOtherProperty => !string.IsNullOrWhiteSpace(DependPropertyName);
public string DependPropertyName { get; set; } = string.Empty;
public string DependPropertyValueStr { get; set; } = string.Empty;
// 普通翻译的字典
public DictionaryTranslateAttribute(string dicParentCode)
{
DicParentCode = dicParentCode;
}
//针对不同的标准 翻译的字典不一样
public DictionaryTranslateAttribute(string dicParentCode, CriterionType criterionType)
{
DicParentCode = dicParentCode;
CriterionType = criterionType;
}
//针对业务某个属性的值 不一样 用的翻译字典不一样
public DictionaryTranslateAttribute(string dicParentCode, string dependPropertyName, string dependPropertyValueStr)
{
DicParentCode = dicParentCode;
DependPropertyName = dependPropertyName;
DependPropertyValueStr = dependPropertyValueStr;
}
public DictionaryTranslateAttribute(string dicParentCode, CriterionType criterionType, string dependPropertyName, string dependPropertyValueStr)
{
DicParentCode = dicParentCode;
DependPropertyName = dependPropertyName;
CriterionType = criterionType;
DependPropertyValueStr = dependPropertyValueStr;
}
}
}