This commit is contained in:
xiaowei.song
2024-06-06 13:19:24 +08:00
parent c93711290e
commit 127c428a9e
919 changed files with 93 additions and 86 deletions

View File

@@ -0,0 +1,83 @@
using System.Collections.Generic;
using ZR.Model.System.Generate;
namespace ZR.CodeGenerator.Model
{
public class GenerateDto
{
/// <summary>
/// vue版本
/// </summary>
public int VueVersion { get; set; }
public long TableId { get; set; }
/// <summary>
/// 是否预览代码
/// </summary>
public bool IsPreview { get; set; }
/// <summary>
/// 生成代码的数据库类型 0、mysql 1、sqlserver
/// </summary>
public int DbType { get; set; }
/// <summary>
/// 生成的按钮功能
/// </summary>
public int[] CheckedBtn { get; set; } = System.Array.Empty<int>();
public GenTable GenTable { get; set; }
/// <summary>
/// 主表属性
/// </summary>
public CodeGenerateOption GenOptions { get; set; }
/// <summary>
/// 子表属性
/// </summary>
public CodeGenerateOption SubTableOptions { get; set; }
#region
/// <summary>
/// 代码模板预览存储路径存放
/// </summary>
public List<GenCode> GenCodes { get; set; } = new List<GenCode>();
/// <summary>
/// 代码生成路径
/// </summary>
public string GenCodePath { get; set; } = string.Empty;
/// <summary>
/// 代码生成压缩包路径
/// </summary>
public string ZipPath { get; set; }
/// <summary>
/// 代码生成压缩包名称
/// </summary>
public string ZipFileName { get; set; }
/// <summary>
/// 生成代码方式0zip压缩包 1自定义路径
/// </summary>
public string GenType { get; set; }
public string GenPath { get; set; } = "";
/// <summary>
/// vue代码路径
/// </summary>
public string VueParentPath { get; set; }
/// <summary>
/// uniapp存储路径
/// </summary>
public string AppVuePath { get; set; } = "ZRAdminn-app";
#endregion
public ReplaceDto ReplaceDto { get; set; }
}
public class GenCode
{
public int Type { get; set; }
public string Title { get; set; }
public string Path { get; set; }
public string Content { get; set; }
public GenCode(int type, string title, string path, string content)
{
Type = type;
Title = title;
Path = path;
Content = content;
}
}
}

View File

@@ -0,0 +1,11 @@
namespace ZR.CodeGenerator.Model
{
/// <summary>
/// Oracle库序列
/// </summary>
public class OracleSeq
{
public string SEQUENCE_NAME { get; set; }
public long LAST_NUMBER { get; set; }
}
}

View File

@@ -0,0 +1,78 @@
using System;
namespace ZR.CodeGenerator.Model
{
public class ReplaceDto
{
/// <summary>
/// 主键字段
/// </summary>
public string PKName { get; set; }
/// <summary>
/// 首字母小写主键
/// </summary>
public string FistLowerPk{ get; set; }
/// <summary>
/// 主键类型
/// </summary>
public string PKType { get; set; }
/// <summary>
/// 控制器权限
/// </summary>
public string PermissionPrefix { get; set; }
/// <summary>
/// C#类名
/// </summary>
public string ModelTypeName { get; set; }
//vue、api
//public string VueViewFormResetHtml { get; set; }
/// <summary>
/// 前端列表查询html
/// </summary>
public string VueViewListHtml { get; set; }
/// <summary>
/// 前端添加、编辑表格html
/// </summary>
public string VueViewFormHtml { get; set; }
/// <summary>
/// 前端搜索表单html
/// </summary>
public string VueQueryFormHtml { get; set; }
/// <summary>
/// 查询条件
/// </summary>
public string QueryCondition { get; set; } = "";
public bool ShowBtnExport { get; set; }
public bool ShowBtnAdd { get; set; }
public bool ShowBtnEdit { get; set; }
public bool ShowBtnDelete { get; set; }
public bool ShowBtnView { get; set; }
public bool ShowBtnTruncate { get; set; }
public bool ShowBtnMultiDel { get; set; }
public bool ShowBtnImport { get; set; }
/// <summary>
/// 上传URL data
/// </summary>
//public string VueUploadUrl { get; set; }
public int UploadFile { get; set; } = 0;
/// <summary>
/// 是否有下拉多选框
/// </summary>
public int SelectMulti { get; set; }
public string Author { get; set; }
public string AddTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd");
/// <summary>
/// 是否有编辑器
/// </summary>
public int ShowEditor { get; set; }
/// <summary>
/// vue页面文件名
/// </summary>
public string ViewFileName { get; set; }
/// <summary>
/// 操作按钮样式
/// </summary>
public int OperBtnStyle { get; set; }
}
}