⚡ 代码生成支持pgsql数据类型
This commit is contained in:
parent
01e7fbd94f
commit
be54ae8379
@ -357,7 +357,7 @@ namespace ZR.CodeGenerator
|
||||
sDatatype = sDatatype.ToLower();
|
||||
string sTempDatatype = sDatatype switch
|
||||
{
|
||||
"int" or "number" or "integer" or "smallint" => "int",
|
||||
"int" or "number" or "integer" or "smallint" or "int4" or "int8" or "int2" => "int",
|
||||
"bigint" => "long",
|
||||
"tinyint" => "byte",
|
||||
"numeric" or "real" or "float" => "float",
|
||||
|
||||
@ -19,8 +19,8 @@ namespace ZR.Model.System
|
||||
public int CategoryId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int ParentId { get; set; }
|
||||
[SugarColumn(ColumnName = "create_time")]
|
||||
public DateTime CreateTime { get; set; }
|
||||
[SugarColumn(ColumnName = "create_time", IsNullable = true)]
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
|
||||
@ -7,9 +7,6 @@ namespace ZR.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 多语言配置,数据实体对象
|
||||
///
|
||||
/// @author mr.zhao
|
||||
/// @date 2022-05-06
|
||||
/// </summary>
|
||||
[Tenant("0")]
|
||||
[SugarTable("sys_common_lang")]
|
||||
@ -26,7 +23,7 @@ namespace ZR.Model.Models
|
||||
/// 语言code
|
||||
/// </summary>
|
||||
[DisplayName("语言code")]
|
||||
[SugarColumn(ColumnName = "lang_code")]
|
||||
[SugarColumn(ColumnName = "lang_code", IsNullable = false)]
|
||||
public string LangCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -40,7 +37,7 @@ namespace ZR.Model.Models
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[DisplayName("名称")]
|
||||
[SugarColumn(ColumnName = "lang_name")]
|
||||
[SugarColumn(ColumnName = "lang_name", IsNullable = false)]
|
||||
public string LangName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -8,33 +8,34 @@ namespace ZR.Model.System
|
||||
//[EpplusTable(PrintHeaders = true, AutofitColumns = true, AutoCalculate = true, ShowTotal = true)]
|
||||
public class SysBase
|
||||
{
|
||||
[SugarColumn(IsOnlyIgnoreUpdate = true, Length = 64)]
|
||||
[SugarColumn(IsOnlyIgnoreUpdate = true, Length = 64, IsNullable = true)]
|
||||
[JsonProperty(propertyName: "CreateBy")]
|
||||
[ExcelIgnore]
|
||||
public string Create_by { get; set; }
|
||||
|
||||
[SugarColumn(IsOnlyIgnoreUpdate = true)]
|
||||
[SugarColumn(IsOnlyIgnoreUpdate = true, IsNullable = true)]
|
||||
[JsonProperty(propertyName: "CreateTime")]
|
||||
[ExcelColumn(Format = "yyyy-MM-dd HH:mm:ss")]
|
||||
public DateTime Create_time { get; set; } = DateTime.Now;
|
||||
|
||||
[JsonIgnore]
|
||||
[JsonProperty(propertyName: "UpdateBy")]
|
||||
[SugarColumn(IsOnlyIgnoreInsert = true, Length = 64)]
|
||||
[SugarColumn(IsOnlyIgnoreInsert = true, Length = 64, IsNullable = true)]
|
||||
[ExcelIgnore]
|
||||
public string Update_by { get; set; }
|
||||
|
||||
//[JsonIgnore]
|
||||
[SugarColumn(IsOnlyIgnoreInsert = true)]
|
||||
[SugarColumn(IsOnlyIgnoreInsert = true, IsNullable = true)]
|
||||
[JsonProperty(propertyName: "UpdateTime")]
|
||||
[ExcelIgnore]
|
||||
public DateTime? Update_time { get; set; }
|
||||
[SugarColumn(Length = 500)]
|
||||
public string Remark { get; set; }
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
[SugarColumn(IsIgnore = true, IsNullable = true)]
|
||||
[JsonIgnore]
|
||||
[ExcelIgnore]
|
||||
public DateTime? BeginTime { get; set; }
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
[SugarColumn(IsIgnore = true, IsNullable = true)]
|
||||
[JsonIgnore]
|
||||
[ExcelIgnore]
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
@ -21,26 +21,26 @@ namespace ZR.Model.System
|
||||
/// <summary>
|
||||
/// 登录用户名
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 30, ColumnDescription = "用户账号", ColumnDataType = "varchar")]
|
||||
[SugarColumn(Length = 30, ColumnDescription = "用户账号", IsNullable = false)]
|
||||
public string UserName { get; set; }
|
||||
/// <summary>
|
||||
/// 用户昵称
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 30, ColumnDescription = "用户昵称", ColumnDataType = "varchar")]
|
||||
[SugarColumn(Length = 30, ColumnDescription = "用户昵称", IsNullable = false)]
|
||||
public string NickName { get; set; }
|
||||
/// <summary>
|
||||
/// 用户类型(00系统用户)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 2, ColumnDescription = "用户类型(00系统用户)", ColumnDataType = "varchar", DefaultValue = "00")]
|
||||
[SugarColumn(Length = 2, ColumnDescription = "用户类型(00系统用户)", DefaultValue = "00")]
|
||||
public string UserType { get; set; } = "00";
|
||||
//[SugarColumn(IsOnlyIgnoreInsert = true)]
|
||||
public string Avatar { get; set; }
|
||||
[SugarColumn(Length = 50, ColumnDescription = "用户邮箱", ColumnDataType = "varchar")]
|
||||
[SugarColumn(Length = 50, ColumnDescription = "用户邮箱")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ExcelIgnore]
|
||||
[SugarColumn(Length = 100, ColumnDescription = "密码", ColumnDataType = "varchar")]
|
||||
[SugarColumn(Length = 100, ColumnDescription = "密码", IsNullable = false)]
|
||||
public string Password { get; set; }
|
||||
/// <summary>
|
||||
/// 手机号
|
||||
@ -55,12 +55,13 @@ namespace ZR.Model.System
|
||||
/// 帐号状态(0正常 1停用)
|
||||
/// </summary>
|
||||
[ExcelIgnore]
|
||||
[SugarColumn(DefaultValue = "0")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 删除标志(0代表存在 2代表删除)
|
||||
/// </summary>
|
||||
//[SugarColumn(IsOnlyIgnoreInsert = true)]
|
||||
[SugarColumn(DefaultValue = "0")]
|
||||
public int DelFlag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -79,6 +80,7 @@ namespace ZR.Model.System
|
||||
/// <summary>
|
||||
/// 部门Id
|
||||
/// </summary>
|
||||
[SugarColumn(DefaultValue = "0")]
|
||||
public long DeptId { get; set; }
|
||||
|
||||
#region 表额外字段
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user