UNIVPLMDataIntegration/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/ColumnOutput.cs

91 lines
2.5 KiB
C#
Raw Normal View History

2024-06-15 13:02:35 +08:00
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
2025-09-14 16:30:13 +08:00
namespace Admin.NET.Core;
2024-06-15 13:02:35 +08:00
/// <summary>
/// 数据库表列
/// </summary>
2025-09-14 16:30:13 +08:00
public class ColumnOutput
2024-06-15 13:02:35 +08:00
{
/// <summary>
2025-09-14 16:30:13 +08:00
/// 属性信息
2024-06-15 13:02:35 +08:00
/// </summary>
2025-09-14 16:30:13 +08:00
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public PropertyInfo PropertyInfo { get; set; }
2024-06-15 13:02:35 +08:00
/// <summary>
/// 实体的Property名
/// </summary>
public string PropertyName { get; set; }
2025-09-14 16:30:13 +08:00
/// <summary>
/// .NET字段类型
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public Type PropertyType { get; set; }
/// <summary>
/// .NET字段类型
/// </summary>
public string NetType { get; set; }
/// <summary>
/// 字段名
/// </summary>
public string ColumnName { get; set; }
2024-06-15 13:02:35 +08:00
/// <summary>
/// 字段数据长度
/// </summary>
public int ColumnLength { get; set; }
/// <summary>
/// 数据库中类型
/// </summary>
public string DataType { get; set; }
/// <summary>
/// 是否为主键
/// </summary>
public bool IsPrimarykey { get; set; }
/// <summary>
2025-09-14 16:30:13 +08:00
/// 是否为外键
2024-06-15 13:02:35 +08:00
/// </summary>
2025-09-14 16:30:13 +08:00
public bool IsForeignKey { get; set; }
2024-06-15 13:02:35 +08:00
/// <summary>
2025-09-14 16:30:13 +08:00
/// 是否允许为空
2024-06-15 13:02:35 +08:00
/// </summary>
2025-09-14 16:30:13 +08:00
public bool IsNullable { get; set; }
2024-06-15 13:02:35 +08:00
/// <summary>
/// 字段描述
/// </summary>
public string ColumnComment { get; set; }
/// <summary>
2025-09-14 16:30:13 +08:00
/// 默认值
2024-06-15 13:02:35 +08:00
/// </summary>
2025-09-14 16:30:13 +08:00
public string DefaultValue { get; set; }
/// <summary>
2025-09-14 16:30:13 +08:00
/// 外键属性信息
/// </summary>
2025-09-14 16:30:13 +08:00
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public PropertyInfo ForeignProperty { get; set; }
/// <summary>
/// 外键表实体类型
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public Type ForeignEntityType { get; set; }
2024-06-15 13:02:35 +08:00
}