first commit

This commit is contained in:
qianhao.xu
2024-09-23 09:14:22 +08:00
commit fdbe20be5a
407 changed files with 35117 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
namespace DOAN.CodeGenerator.Model
{
public class CodeGenerateOption
{
/// <summary>
/// 项目命名空间
/// </summary>
public string BaseNamespace { get; set; }
/// <summary>
/// 下级命名空间
/// </summary>
public string SubNamespace { get; set; }
/// <summary>
/// 数据实体命名空间
/// </summary>
public string ModelsNamespace { get; set; }
/// <summary>
/// 输入输出数据实体名称空间
/// </summary>
public string DtosNamespace { get; set; }
///// <summary>
///// 仓储接口命名空间
///// </summary>
//public string IRepositoriesNamespace { get; set; }
/// <summary>
/// 仓储实现名称空间
/// </summary>
public string RepositoriesNamespace { get; set; }
/// <summary>
/// 服务接口命名空间
/// </summary>
public string IServicsNamespace { get; set; }
/// <summary>
/// 服务接口实现命名空间
/// </summary>
public string ServicesNamespace { get; set; }
/// <summary>
/// Api控制器命名空间
/// </summary>
public string ApiControllerNamespace { get; set; }
/// <summary>
/// 要生数据的表,用“,”分割
/// </summary>
//public string TableList { get; set; }
}
}

View File

@@ -0,0 +1,83 @@
using System.Collections.Generic;
using DOAN.Model.System.Generate;
namespace DOAN.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; } = "DOANAdminn-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,17 @@
using System.Collections.Generic;
namespace DOAN.CodeGenerator.Model
{
public class ImportCodeGenTableDto
{
public int FrontTpl { get; set; }
public string DbName { get; set; }
public List<CodeGenTables> Tables { get; set; }
}
public class CodeGenTables
{
public string Name { get; set; }
public string Description { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using Infrastructure.Model;
namespace DOAN.CodeGenerator.Model
{
public class InitTableDto
{
public int FrontTpl { get; set; }
public string DbName { get; set; }
public string UserName { get; set; }
public string TableName { get; set; }
public string Desc { get; set; }
public CodeGen CodeGen { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
namespace DOAN.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,83 @@
using System;
namespace DOAN.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; }
/// <summary>
/// 是否使用雪花id
/// </summary>
public bool UseSnowflakeId { get; set; }
public bool EnableLog { get; set; }
}
}