Files
CapMachine/CapMachine.Model/ModelMapConfig/Columns.cs
2024-12-18 15:50:21 +08:00

86 lines
2.1 KiB
C#

using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Model.ModelMapConfig
{
/// <summary>
/// ModelMap的Columns
/// </summary>
[Table(Name = "Columns")]
public class Columns
{
/// <summary>
/// 主键
/// </summary>
[Column(IsPrimary = true, IsIdentity = true)]
public long Id { get; set; }
/// <summary>
/// 名称
/// </summary>
[Column(Name = "Name", IsNullable = true, StringLength = 50)]
public string? Name { get; set; }
/// <summary>
/// MapType
/// </summary>
[Column(Name = "MapType", IsNullable = true, StringLength = 50)]
public string? MapType { get; set; }
/// <summary>
/// 使用字符串属性时
/// 字符串长度
/// </summary>
[Column(Name = "StringLength")]
public short StringLength { get; set; }
/// <summary>
/// 是否可空
/// 可空
/// </summary>
[Column(Name = "IsNullable")]
public bool IsNullable { get; set; }
/// <summary>
/// 使用decimal 属性时
/// 小数点
/// </summary>
[Column(Name = "Precision")]
public short Precision { get; set; }
/// <summary>
/// 使用decimal 属性时
/// 长度
/// </summary>
[Column(Name = "Scale")]
public short Scale { get; set; }
///// <summary>
///// 使用时间属性时
///// 时间的特点
///// </summary>
//[Column(Name = "ServerTime", IsNullable = true, StringLength = 50)]
//public string ServerTime { get; set; }
/// <summary>
/// 是否主键
/// </summary>
[Column(Name = "IsPrimary")]
public bool IsPrimary { get; set; }
/// <summary>
/// 是否自增
/// </summary>
[Column(Name = "IsIdentity")]
public bool IsIdentity { get; set; }
}
}