- 补充 IDbFirst GetTableByDatabase 返回 uk/fk/index 名称,以便迁移;

This commit is contained in:
28810
2019-04-26 18:10:51 +08:00
parent 24df5d6107
commit 5bb90a974b
11 changed files with 145 additions and 110 deletions

View File

@@ -38,6 +38,10 @@ namespace FreeSql.DataAnnotations {
/// </summary>
public bool IsVersion { get => _IsVersion ?? false; set => _IsVersion = value; }
/// <summary>
/// 唯一键,多个属性指定相同的标识,代表联合键
/// </summary>
public string Unique { get; set; }
/// <summary>
/// 数据库默认值
/// </summary>

View File

@@ -65,6 +65,15 @@ namespace FreeSql.DataAnnotations {
return this;
}
/// <summary>
/// 唯一键,多个属性指定相同的标识,代表联合键
/// </summary>
/// <param name="value">标识</param>
/// <returns></returns>
public ColumnFluent Unique(string value) {
_column.Unique = value;
return this;
}
/// <summary>
/// 类型映射,比如:可将 enum 属性映射成 typeof(string)
/// </summary>
/// <param name="type"></param>