2021-09-09 18:18:37 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
2021-09-23 20:54:26 +08:00
|
|
|
|
using ZR.Model.System.Generate;
|
2021-09-09 18:18:37 +08:00
|
|
|
|
|
|
|
|
|
|
namespace ZR.CodeGenerator.Model
|
|
|
|
|
|
{
|
|
|
|
|
|
public class GenerateDto
|
|
|
|
|
|
{
|
2021-09-18 16:10:34 +08:00
|
|
|
|
public long TableId { get; set; }
|
2021-09-24 18:37:51 +08:00
|
|
|
|
//public string[] QueryColumn { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否预览代码
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int IsPreview { get; set; }
|
2021-09-09 18:18:37 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 要生成的文件
|
|
|
|
|
|
/// </summary>
|
2021-09-24 18:37:51 +08:00
|
|
|
|
public int[] GenCodeFiles { get; set; }
|
2021-09-16 17:52:31 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 如果目标文件存在,是否覆盖。默认为false
|
|
|
|
|
|
/// </summary>
|
2021-09-24 18:37:51 +08:00
|
|
|
|
public bool Coverd { get; set; } = true;
|
2021-09-24 10:09:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 生成代码的数据库类型 0、mysql 1、sqlserver
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int DbType { get; set; }
|
2021-09-23 20:54:26 +08:00
|
|
|
|
public GenTable GenTable { get; set; }
|
2021-09-22 20:25:43 +08:00
|
|
|
|
#region 存储路径
|
2021-09-24 18:37:51 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 代码模板预览存储路径存放
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public List<GenCode> GenCodes { get; set; } = new List<GenCode>();
|
2021-09-23 10:58:25 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 代码生成路径
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string GenCodePath { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 代码生成压缩包路径
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string ZipPath { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 代码生成压缩包名称
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string ZipFileName { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 父级菜单id
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public long ParentMenuId { get; set; }
|
2021-09-22 20:25:43 +08:00
|
|
|
|
#endregion
|
2021-09-09 18:18:37 +08:00
|
|
|
|
}
|
2021-09-24 18:37:51 +08:00
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-09-09 18:18:37 +08:00
|
|
|
|
}
|