1 Star 2 Fork 1

我被自己帅瞎了! / codesmith-java代码模板

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Entity.cst 2.00 KB
一键复制 编辑 原始数据 按行查看 历史
我被自己帅瞎了! 提交于 2021-02-08 14:25 . 第一次提交
<%@ CodeTemplate Inherits="CodeTemplate" Language="C#" TargetLanguage="Java" Description="NetTiers main template." Debug="True" ResponseEncoding="UTF-8"%>
<%@ Assembly Name="SchemaExplorer"%>
<%@ Import Namespace="SchemaExplorer"%>
<%@ Property Name="Table" Type="TableSchema" DeepLoad="True" Optional="False" Category="01. Getting Started - Required" Description=""%>
<!-- #include file="Common/Common.cst" -->
<%
string DtoPascal = GetPascal(Table.Name) +"Dto";
string DtoHump = GetHump(Table.Name) +"Dto";
%>
package <%= ModelNamespacesStr %>;
import java.io.Serializable;
import java.util.Date;
/**
* @author :框架自动生成,赵韩佳
* @date :<%= DateTime.Now.ToLongDateString() %>
* @description : <%= Table.Description %>Dto
*/
public class <%= GetPascal(Table.Name) %>Dto implements Serializable {
<%foreach(ColumnSchema col in Table.Columns){
if(IsGenerateColumn(col.Name)){ continue; }
if(col.Name == delfield){ continue; }
%>
/**
* <%= col.ExtendedProperties["CS_Description"].Value %>
*/
private <%= GetDataType(col.DataType) %> <%= GetHump(col.Name) %>;
<% } %>
<%foreach(ColumnSchema col in Table.Columns){
if(IsGenerateColumn(col.Name)){ continue; }
if(col.Name == delfield){ continue; }
%>
/**
* 返回 <%= col.ExtendedProperties["CS_Description"].Value %>
* @return <%= GetHump(col.Name) %>
*/
public <%= GetDataType(col.DataType) %> get<%= GetPascal(GetColumn(col.Name)) %>() {
return <%= GetHump(col.Name)%>;
}
/**
* 设置 <%= col.ExtendedProperties["CS_Description"].Value %>
* @param <%= GetHump(col.Name) %>
*/
public void set<%= GetPascal(GetColumn(col.Name)) %>(<%= GetDataType(col.DataType) %> <%= GetHump(col.Name)%>) {
this.<%= GetHump(col.Name)%> = <%= GetHump(col.Name)%>;
}
<% } %>
}
其他
1
https://gitee.com/momentzhj/codesmith-java-code-template.git
git@gitee.com:momentzhj/codesmith-java-code-template.git
momentzhj
codesmith-java-code-template
codesmith-java代码模板
master

搜索帮助