55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
////////////////////////////////////////////////////
|
|
// 本文件由拓通低代码开发平台自动生成,请不要修改 //
|
|
// ________ ___ ________ //
|
|
// /__ __/ / \ /__ __/ //
|
|
// / / / / / / //
|
|
// / / / / / / //
|
|
// /__/ \___/ /__/ //
|
|
// //
|
|
////////////////////////////////////////////////////
|
|
|
|
@using JNPF.Common.Extension;
|
|
@using Tnb.Core;
|
|
@using Tnb.Vengine;
|
|
@using Tnb.Vengine.Domain;
|
|
@{
|
|
AcmenVmodelContext context = Model;
|
|
Vmodel vm = context.Vm;
|
|
}
|
|
using Newtonsoft.Json.Linq;
|
|
using SqlSugar;
|
|
using Tnb.Core;
|
|
using Yitter.IdGenerator;
|
|
|
|
namespace @(context.NsPrefix + "." + vm.areaCode + ".Domain");
|
|
|
|
/// <summary>
|
|
/// @vm.vmName
|
|
/// </summary>
|
|
[SugarTable("@vm.tableName")]
|
|
public partial class @vm.vmCode : Entity
|
|
{
|
|
#region Properties
|
|
@foreach (var col in vm.dbProps.OrderBy(a=>a.ordinal)) {
|
|
@:/// <summary>
|
|
@:/// @col.name
|
|
@:/// </summary>
|
|
@col.GetAttributeString()
|
|
@:public @(col.required ? col.csType : (col.csType + "?")) @col.code { get; set; }@(col.GetDefaultValueString())
|
|
@:
|
|
}
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// 主键
|
|
/// </summary>
|
|
public override object[] GetKeys()
|
|
{
|
|
return new object[] { @(vm.dbProps.Where(a=>a.pkey).Select(a=>a.code).JoinAsString(", ")) };
|
|
}
|
|
|
|
@foreach (var col in vm.dbProps.OrderBy(a => a.ordinal)){
|
|
@://public @(col.required ? col.csType : (col.csType + "?")) @col.code { get; set; }@(col.GetDefaultValueString())
|
|
}
|
|
}
|