Files

38 lines
1.4 KiB
Plaintext

<%@ Template Language="C#" TargetLanguage="C#" Debug="True" Encoding="UTF-8" %>
<%@ Assembly Src="..\..\..\Common\Model.cs" %>
<%@ Assembly Src="..\..\..\Common\Extensions.cs" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.Text.RegularExpressions" %>
<%@ Import Namespace="SchemaMapper" %>
<%@ Property Name="Entity" Type="SchemaMapper.Entity" %>
<%@ Property Name="Namespace" Type="System.String" %>
<%-- Safe类名 --%>
<% string SafeClassName = Entity.ClassName.ToSafeName(); %>
<%-- 描述 --%>
<% string Description = Entity.Description; %>
using System;
using Util.Domains;
using Util.Domains.Auditing;
using Util.Datas.Persistence;
namespace <%= Namespace %>.Data.Pos.<%= Entity.TableSchema %>{
/// <summary>
/// <%= Description %>持久化对象
/// </summary>
public class <%= SafeClassName %>Po : TreePersistentObjectBase<%=Entity.GetInterfaces()%> {
<% foreach(Property p in Entity.Properties) { %>
<% if( p.IsPrimaryKey.SafeValue() ) continue; %>
<% if( Entity.IgnoreTreeEntityProperty(p) ) continue;%>
<% if( p.ColumnName == "Version" && p.DataType == DbType.Binary ) continue;%>
/// <summary>
/// <%= p.Description %>
/// </summary>
public <%= p.TypeName %> <%= p.PropertyName.ToSafeName() %> { get; set; }
<% }%>
}
}