😎增加rezero文件模板种子

This commit is contained in:
zuohuaijun 2025-03-16 01:21:09 +08:00
parent 93ecd77f05
commit aa026a738a
2 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,51 @@
//// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
////
//// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
////
//// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
//using Admin.NET.Core;
//using ReZero.SuperAPI;
//namespace Admin.NET.Plugin.ReZero;
///// <summary>
///// 超级API文件模板表种子数据
///// </summary>
//public class ZeroTemplateSeedData : ISqlSugarEntitySeedData<ZeroTemplate>
//{
// /// <summary>
// /// 种子数据
// /// </summary>
// /// <returns></returns>
// public IEnumerable<ZeroTemplate> HasData()
// {
// return
// [
// // Admin.NET 实体模板
// new ZeroTemplate
// {
// Id=1300000000101,
// TypeId=TemplateType.Entity,
// Title="Admin.NET 实体模板",
// TemplateContent="// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\r\n//\r\n// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\r\n//\r\n// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!\r\n\r\nnamespace Admin.NET.Application;\r\n\r\n/// <summary>\r\n/// {{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\r\n///</summary>\r\n[SugarTable(null, \"{{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\")]\r\npublic class {{Model.ClassName}} : EntityBase\r\n{\r\n<% foreach (var item in Model.PropertyGens) {\r\n var isPrimaryKey = item.IsPrimaryKey ? \",IsPrimaryKey = true\" : \"\";\r\n var isIdentity = item.IsIdentity ? \",IsIdentity = true\" : \"\"; \r\n var isIgnore=(item.IsIgnore?\",IsIgnore = true\":\"\");\r\n var isJson=item.IsJson?\",IsJson= true\":\"\" ; \r\n var stringValue=item.PropertyType==\"string\"?\"= null!;\":\"\";//C#低版本改模版\r\n%> \r\n /// <summary>\r\n /// {{item.Description}}\r\n ///</summary>\r\n [SugarColumn(ColumnDescription = \"{{item.Description}}\" {{isPrimaryKey+isIdentity+isIgnore+isJson}}) ]\r\n public {{item.PropertyType}} {{item.PropertyName}} { get; set; } {{stringValue}}\r\n<%} %>\r\n}\r\n \r\n",
// TemplateContentStyle="csharp",
// Url="C:\\Admin.NET.Entity\\{0}.cs",
// SortId=100,
// CreateTime=DateTime.Parse("2025-03-15 00:00:00")
// },
// // Admin.NET 接口模板
// new ZeroTemplate
// {
// Id=1300000000201,
// TypeId=TemplateType.Api,
// Title="Admin.NET 接口模板",
// TemplateContent="// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\r\n//\r\n// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\r\n//\r\n// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!\r\n\r\nnamespace Admin.NET.Application;\r\n\r\n/// <summary>\r\n/// {{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\r\n///</summary>\r\n[SugarTable(null, \"{{(Model.Description+\"\").Replace(\"\\r\",\"\").Replace(\"\\n\",\"\")}}\")]\r\npublic class {{Model.ClassName}} : EntityBase\r\n{\r\n<% foreach (var item in Model.PropertyGens) {\r\n var isPrimaryKey = item.IsPrimaryKey ? \",IsPrimaryKey = true\" : \"\";\r\n var isIdentity = item.IsIdentity ? \",IsIdentity = true\" : \"\"; \r\n var isIgnore=(item.IsIgnore?\",IsIgnore = true\":\"\");\r\n var isJson=item.IsJson?\",IsJson= true\":\"\" ; \r\n var stringValue=item.PropertyType==\"string\"?\"= null!;\":\"\";//C#低版本改模版\r\n%> \r\n /// <summary>\r\n /// {{item.Description}}\r\n ///</summary>\r\n [SugarColumn(ColumnDescription = \"{{item.Description}}\" {{isPrimaryKey+isIdentity+isIgnore+isJson}}) ]\r\n public {{item.PropertyType}} {{item.PropertyName}} { get; set; } {{stringValue}}\r\n<%} %>\r\n}\r\n \r\n",
// TemplateContentStyle="csharp",
// Url="C:\\Admin.NET.Service\\{0}.cs",
// SortId=100,
// CreateTime=DateTime.Parse("2025-03-15 00:00:00")
// },
// ];
// }
//}

View File

@ -95,7 +95,7 @@
"@vitejs/plugin-vue": "^5.2.1",
"@vitejs/plugin-vue-jsx": "^4.1.1",
"@vue/compiler-sfc": "^3.5.13",
"code-inspector-plugin": "^0.20.4",
"code-inspector-plugin": "^0.20.6",
"eslint": "^9.22.0",
"eslint-plugin-vue": "^10.0.0",
"globals": "^16.0.0",