更改项目目录
This commit is contained in:
@@ -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/BBS";
|
||||
public const string BuildEntityPath = "../../../../../project/BBS";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ TemplateFactory templateFactory = new();
|
||||
|
||||
//选择需要生成的模板提供者
|
||||
|
||||
string modelName = "School";
|
||||
string modelName = "Forum";
|
||||
string nameSpaces = "Yi.BBS";
|
||||
List<string> entityNames = new() { "Student" };
|
||||
List<string> entityNames = new() { "Plate" };
|
||||
|
||||
foreach (var entityName in entityNames)
|
||||
{
|
||||
@@ -29,7 +29,7 @@ foreach (var entityName in entityNames)
|
||||
//option.Add(new ApiTemplateProvider(modelName, entityName));
|
||||
});
|
||||
//开始构建模板
|
||||
//templateFactory.BuildTemplate();
|
||||
templateFactory.BuildTemplate();
|
||||
Console.WriteLine($"Yi.Framework.Template:{entityName}构建完成!");
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Yi.Framework.Template.Provider.Site
|
||||
{
|
||||
public class ApiTemplateProvider : ProgramTemplateProvider
|
||||
{
|
||||
public ApiTemplateProvider(string modelName, string entityName) : base(modelName, entityName)
|
||||
public ApiTemplateProvider(string modelName, string entityName, string nameSpaces) : base(modelName, entityName, nameSpaces)
|
||||
{
|
||||
BuildPath = $@"..\..\..\Code_Site\src\api\{TemplateConst.LowerModelName}\{TemplateConst.LowerEntityName}Api.js";
|
||||
TemplatePath = $@"..\..\..\Template\Site\ApiTemplate.txt";
|
||||
|
||||
Reference in New Issue
Block a user