31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
|
|
using WinformGeneralDeveloperFrame.Commons;
|
||
|
|
|
||
|
|
namespace ${NameSpace}.Entity
|
||
|
|
{
|
||
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using System.ComponentModel.DataAnnotations;
|
||
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
||
|
|
using System.Data.Entity.Spatial;
|
||
|
|
|
||
|
|
[Table("${tableName}")]
|
||
|
|
public partial class ${tableName}Info
|
||
|
|
{
|
||
|
|
#foreach($info in $EntityList)
|
||
|
|
#if(${info.isKey}&&${info.dataBaseFieldName}!="ID"&&${info.dataBaseFieldName}!="id"&&${info.dataBaseFieldName}!="Id"&&${info.dataBaseFieldName}!="iD")
|
||
|
|
[Key]
|
||
|
|
[NoEdit("${info.controlName}")]
|
||
|
|
#end
|
||
|
|
#if(${info.isIdentity}&&${info.dataBaseFieldName}!="ID"&&${info.dataBaseFieldName}!="id"&&${info.dataBaseFieldName}!="Id"&&${info.dataBaseFieldName}!="iD")
|
||
|
|
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||
|
|
#end
|
||
|
|
[ModelBindControl("${info.controlName}")]
|
||
|
|
#if(${info.CSharpFieldType}=="DateTime")
|
||
|
|
public ${info.CSharpFieldType}? ${info.CSharpFieldName}{set;get;}=DateTime.Now;
|
||
|
|
#else
|
||
|
|
public ${info.CSharpFieldType} ${info.CSharpFieldName}{set;get;}
|
||
|
|
#end
|
||
|
|
#end
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|