AFR
parent
1c6d9a55e5
commit
96e7b57169
@ -0,0 +1,8 @@
|
||||
################################################################################
|
||||
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
|
||||
################################################################################
|
||||
|
||||
/web/djy.Model/AFR/生成实体类/AFRCntrno.cs
|
||||
/web/djy.Model/AFR/生成实体类/AFRHouse.cs
|
||||
/web/djy.Model/AFR/生成实体类/AFRMaster.cs
|
||||
/web/djy.Model/AFR/生成实体类/AFRMasterHistory.cs
|
@ -0,0 +1,4 @@
|
||||
[*.cs]
|
||||
|
||||
# CS1591: 缺少对公共可见类型或成员的 XML 注释
|
||||
dotnet_diagnostic.CS1591.severity = suggestion
|
@ -0,0 +1,66 @@
|
||||
using FreeSql.DatabaseModel;@{
|
||||
var gen = Model as RazorModel;
|
||||
|
||||
Func<string, string> GetAttributeString = attr => {
|
||||
if (string.IsNullOrEmpty(attr)) return "";
|
||||
return string.Concat(", ", attr.Trim('[', ']')).Trim(',');
|
||||
};
|
||||
Func<string, string> GetDefaultValue = defval => {
|
||||
if (string.IsNullOrEmpty(defval)) return "";
|
||||
return " = " + defval + ";";
|
||||
};
|
||||
}@{
|
||||
switch (gen.fsql.Ado.DataType) {
|
||||
case FreeSql.DataType.PostgreSQL:
|
||||
@:using System;
|
||||
@:using System.Collections;
|
||||
@:using System.Collections.Generic;
|
||||
@:using System.Linq;
|
||||
@:using System.Reflection;
|
||||
@:using System.Threading.Tasks;
|
||||
@:using Newtonsoft.Json;
|
||||
@:using FreeSql.DataAnnotations;
|
||||
@:using System.Net;
|
||||
@:using Newtonsoft.Json.Linq;
|
||||
@:using System.Net.NetworkInformation;
|
||||
@:using NpgsqlTypes;
|
||||
@:using Npgsql.LegacyPostgis;
|
||||
break;
|
||||
case FreeSql.DataType.SqlServer:
|
||||
case FreeSql.DataType.MySql:
|
||||
default:
|
||||
@:using System;
|
||||
@:using System.Collections;
|
||||
@:using System.Collections.Generic;
|
||||
@:using System.Linq;
|
||||
@:using System.Reflection;
|
||||
@:using System.Threading.Tasks;
|
||||
@:using Newtonsoft.Json;
|
||||
@:using FreeSql.DataAnnotations;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
namespace @gen.NameSpace {
|
||||
|
||||
@if (false == false) {
|
||||
@:/// <summary>
|
||||
@:/// @gen.table.Comment.Replace("\r\n", "\n").Replace("\n", "\r\n /// ")
|
||||
@:/// </summary>
|
||||
}
|
||||
[@GetAttributeString(gen.GetTableAttribute())]
|
||||
public partial class @gen.GetCsName(gen.FullTableName) {
|
||||
|
||||
@foreach (var col in gen.columns) {
|
||||
|
||||
if (false == false) {
|
||||
@:/// <summary>
|
||||
@:/// @col.Comment.Replace("\r\n", "\n").Replace("\n", "\r\n /// ")
|
||||
@:/// </summary>
|
||||
}
|
||||
@:public @gen.GetCsType(col) @gen.GetCsName(col.Name) { get; set; }@GetDefaultValue(gen.GetColumnDefaultValue(col, false))
|
||||
@:
|
||||
}
|
||||
}
|
||||
@gen.GetMySqlEnumSetDefine()
|
||||
}
|
Loading…
Reference in New Issue