新增多语言管理
This commit is contained in:
59
ZR.Model/System/CommonLang.cs
Normal file
59
ZR.Model/System/CommonLang.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SqlSugar;
|
||||
using OfficeOpenXml.Attributes;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ZR.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 多语言配置,数据实体对象
|
||||
///
|
||||
/// @author zr
|
||||
/// @date 2022-05-06
|
||||
/// </summary>
|
||||
[Tenant("0")]
|
||||
[SugarTable("sys_common_lang")]
|
||||
public class CommonLang
|
||||
{
|
||||
/// <summary>
|
||||
/// 描述 : id
|
||||
/// 空值 : false
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[EpplusTableColumn(Header = "id")]
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 语言code
|
||||
/// 空值 : false
|
||||
/// </summary>
|
||||
[EpplusTableColumn(Header = "语言code")]
|
||||
[SugarColumn(ColumnName = "lang_code")]
|
||||
public string LangCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 语言key
|
||||
/// 空值 : true
|
||||
/// </summary>
|
||||
[EpplusTableColumn(Header = "语言key")]
|
||||
[SugarColumn(ColumnName = "lang_key")]
|
||||
public string LangKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 名称
|
||||
/// 空值 : false
|
||||
/// </summary>
|
||||
[EpplusTableColumn(Header = "名称")]
|
||||
[SugarColumn(ColumnName = "lang_name")]
|
||||
public string LangName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述 : 添加时间
|
||||
/// 空值 : true
|
||||
/// </summary>
|
||||
[EpplusTableColumn(Header = "添加时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")]
|
||||
public DateTime? Addtime { get; set; }
|
||||
}
|
||||
}
|
||||
35
ZR.Model/System/Dto/CommonLangDto.cs
Normal file
35
ZR.Model/System/Dto/CommonLangDto.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ZR.Model.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 多语言配置输入对象
|
||||
/// </summary>
|
||||
public class CommonLangDto
|
||||
{
|
||||
[Required(ErrorMessage = "id不能为空")]
|
||||
public long Id { get; set; }
|
||||
//[Required(ErrorMessage = "语言code不能为空")]
|
||||
public string LangCode { get; set; }
|
||||
public string LangKey { get; set; }
|
||||
[Required(ErrorMessage = "名称不能为空")]
|
||||
public string LangName { get; set; }
|
||||
public string LangNameEn { get; set; }
|
||||
public string LangNameTw { get; set; }
|
||||
//public List<CommonLangDto> Langs { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 多语言配置查询对象
|
||||
/// </summary>
|
||||
public class CommonLangQueryDto : PagerInfo
|
||||
{
|
||||
public string LangCode { get; set; }
|
||||
public string LangKey { get; set; }
|
||||
public DateTime? BeginAddtime { get; set; }
|
||||
public DateTime? EndAddtime { get; set; }
|
||||
public int ShowMode { get; set; }
|
||||
}
|
||||
}
|
||||
13
ZR.Model/System/Vo/LangVo.cs
Normal file
13
ZR.Model/System/Vo/LangVo.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ZR.Model.System.Vo
|
||||
{
|
||||
public class LangVo
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user