V1版本
This commit is contained in:
85
CapMachine.Model/ModelMapConfig/Columns.cs
Normal file
85
CapMachine.Model/ModelMapConfig/Columns.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
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; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
42
CapMachine.Model/ModelMapConfig/ModelMap.cs
Normal file
42
CapMachine.Model/ModelMapConfig/ModelMap.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
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
|
||||
/// 模型的匹配
|
||||
/// </summary>
|
||||
[Table(Name = "ModelMap")]
|
||||
public class ModelMap
|
||||
{
|
||||
/// <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>
|
||||
/// 内容
|
||||
/// </summary>
|
||||
[Column(Name = "Comment", IsNullable = true, StringLength = 50)]
|
||||
public string? Comment { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ///////////////////////////////////////////导航属性///////////////////////////////////////////////////////
|
||||
/// </summary>
|
||||
|
||||
public List<Columns>? Columns { get; set; }
|
||||
}
|
||||
}
|
||||
24
CapMachine.Model/ModelMapConfig/RecordKeyValue.cs
Normal file
24
CapMachine.Model/ModelMapConfig/RecordKeyValue.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CapMachine.Model.ModelMapConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 存储的Key值数据
|
||||
/// </summary>
|
||||
public class RecordKeyValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表名称
|
||||
/// </summary>
|
||||
public string? TableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 要存储的键值对集合
|
||||
/// </summary>
|
||||
public Dictionary<string, object>? KeyValuePairs { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user