using GenerateCode_WeiBen_WMS.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GenerateCode_GEBrilliantFactory
{
///
/// 生成查询实体类
///
public class Dto_Generate : BaseGenerate
{
public static string CreateText(GenerateCodeParam param)
{
var str = TextHelper.ReadText(@"Templete\Entity\Dto模板.txt");
CommonReplace(ref str);
CommonHelper.CommonReplaceStr(param, ref str);
string attrString = "";
List newColumnNameList = ListHelper.OnlyRemoveId(param.ColumnNameList);
for (int i = 0; i < newColumnNameList.Count; ++i)
{
attrString += StructStrHelper.GenerateAttributeForDto(newColumnNameList[i], param);
}
str = str.Replace("$AddAttributesForDto$", attrString);
return str;
}
}
}