添加用户实体
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Yi.Framework.Template.Abstract
|
||||
|
||||
public ModelTemplateProvider(string modelName, string entityName, string nameSpaces) : base(modelName, entityName, nameSpaces)
|
||||
{
|
||||
AddIgnoreEntityField(/*"Id", */"TenantId", "IsDeleted");
|
||||
AddIgnoreEntityField(/*"Id", */"TenantId", "IsDeleted", "LastModifierId", "LastModificationTime","OrderNum");
|
||||
}
|
||||
|
||||
private string entityPath=string.Empty;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Yi.Framework.Template.ConstClasses
|
||||
|
||||
public const string NameSpaces = "#NameSpaces#";
|
||||
|
||||
public const string BuildRootPath = "../../../../../project/BBS";
|
||||
public const string BuildEntityPath = "../../../../../project/BBS";
|
||||
public const string BuildRootPath = "../../../../../project/rbac";
|
||||
public const string BuildEntityPath = "../../../../../project/rbac";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,38 +14,38 @@ TemplateFactory templateFactory = new();
|
||||
//string modelName = "Exhibition";
|
||||
//string nameSpaces = "Yi.BBS";
|
||||
//List<string> entityNames = new() { "Banner" };
|
||||
//string modelName = "Forum";
|
||||
//string nameSpaces = "Yi.BBS";
|
||||
//List<string> entityNames = new() { "_" };
|
||||
string modelName = "Identity";
|
||||
string nameSpaces = "Yi.RBAC";
|
||||
List<string> entityNames = new() { "User" };
|
||||
|
||||
|
||||
|
||||
|
||||
//foreach (var entityName in entityNames)
|
||||
//{
|
||||
// templateFactory.CreateTemplateProviders((option) =>
|
||||
// {
|
||||
// option.Add(new ServiceTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new IServiceTemplateProvider(modelName, entityName, nameSpaces));
|
||||
foreach (var entityName in entityNames)
|
||||
{
|
||||
templateFactory.CreateTemplateProviders((option) =>
|
||||
{
|
||||
option.Add(new ServiceTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new IServiceTemplateProvider(modelName, entityName, nameSpaces));
|
||||
|
||||
// option.Add(new CreateInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new UpdateInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new GetListInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new GetListOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new GetOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new CreateInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new UpdateInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new GetListInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new GetListOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new GetOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
|
||||
// option.Add(new ConstTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new ProfileTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// //option.Add(new ApiTemplateProvider(modelName, entityName));
|
||||
// });
|
||||
// //开始构建模板
|
||||
// templateFactory.BuildTemplate();
|
||||
// Console.WriteLine($"Yi.Framework.Template:{entityName}构建完成!");
|
||||
//}
|
||||
option.Add(new ConstTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new ProfileTemplateProvider(modelName, entityName, nameSpaces));
|
||||
//option.Add(new ApiTemplateProvider(modelName, entityName));
|
||||
});
|
||||
//开始构建模板
|
||||
templateFactory.BuildTemplate();
|
||||
Console.WriteLine($"Yi.Framework.Template:{entityName}构建完成!");
|
||||
}
|
||||
|
||||
//Console.WriteLine("Yi.Framework.Template:模板全部生成完成!");
|
||||
//Console.ReadKey();
|
||||
Console.WriteLine("Yi.Framework.Template:模板全部生成完成!");
|
||||
Console.ReadKey();
|
||||
|
||||
//根据模板文件生成项目文件
|
||||
var template = "D:\\C#\\Yi\\Yi.Framework.Net6\\src\\project\\rbac";
|
||||
FileHelper.AllInfoReplace(template, "Template", "RBAC");
|
||||
//var template = "D:\\C#\\Yi\\Yi.Framework.Net6\\src\\project\\rbac";
|
||||
//FileHelper.AllInfoReplace(template, "Template", "RBAC");
|
||||
Reference in New Issue
Block a user