FreeSql/FreeSql/DatabaseModel/DBColumnInfo.cs

61 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
namespace FreeSql.DatabaseModel
{
public class DbColumnInfo
{
/// <summary>
/// 所属表
/// </summary>
public DbTableInfo Table { get; set; }
/// <summary>
/// 列名
/// </summary>
public string Name { get; set; }
/// <summary>
/// 映射到 C# 类型
/// </summary>
public Type CsType { get; set; }
/// <summary>
/// 数据库枚举类型int值
/// </summary>
public int DbType { get; set; }
/// <summary>
/// 数据库类型字符串varchar
/// </summary>
public string DbTypeText { get; set; }
/// <summary>
/// 数据库类型字符串varchar(255)
/// </summary>
public string DbTypeTextFull { get; set; }
/// <summary>
/// 最大长度
/// </summary>
public int MaxLength { get; set; }
/// <summary>
/// 主键
/// </summary>
public bool IsPrimary { get; set; }
/// <summary>
/// 自增标识
/// </summary>
public bool IsIdentity { get; set; }
/// <summary>
/// 是否可DBNull
/// </summary>
public bool IsNullable { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Coment { get; set; }
/// <summary>
/// 数据库默认值
/// </summary>
public string DefaultValue { get; set; }
/// <summary>
/// 字段位置
/// </summary>
public int Position { get; set; }
}
}