style: 修改codegen命名

This commit is contained in:
橙子
2024-02-16 21:06:34 +08:00
parent 6675376241
commit 3f1f76b2e8
50 changed files with 141 additions and 143 deletions

View File

@@ -0,0 +1,42 @@
using Volo.Abp.Application.Dtos;
using Yi.Framework.CodeGen.Domain.Shared.Enums;
namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Field
{
public class FieldDto : EntityDto<Guid>
{
/// <summary>
/// 字段名称
/// </summary>
public string Name { get; set; }
public string? Description { get; set; }
public int OrderNum { get; set; }
public int Length { get; set; }
public FieldTypeEnum FieldType { get; set; }
public Guid TableId { get; set; }
/// <summary>
/// 是否必填
/// </summary>
public bool IsRequired { get; set; }
/// <summary>
/// 是否主键
/// </summary>
public bool IsKey { get; set; }
/// <summary>
/// 是否自增
/// </summary>
public bool IsAutoAdd { get; set; }
/// <summary>
/// 是否公共
/// </summary>
public bool IsPublic { get; set; }
public Guid Id { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using Volo.Abp.Application.Dtos;
namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Field
{
public class FieldGetListInput : PagedAndSortedResultRequestDto
{
/// <summary>
/// 字段名称
/// </summary>
public string? Name { get; set; }
public Guid? TableId { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
using Volo.Abp.Application.Dtos;
using Yi.Framework.CodeGen.Application.Contracts.Dtos.Field;
namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Table
{
public class TableDto : EntityDto<Guid>
{
public Guid Id { get; set; }
/// <summary>
/// 表名
/// </summary>
public string Name { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Description { get; set; }
/// <summary>
/// 一表多字段
/// </summary>
public List<FieldDto> Fields { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
using Volo.Abp.Application.Dtos;
namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Table
{
public class TableGetListInput : PagedAndSortedResultRequestDto
{
}
}

View File

@@ -0,0 +1,30 @@
using Volo.Abp.Application.Dtos;
namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Template
{
public class TemplateDto : EntityDto<Guid>
{
public Guid Id { get; set; }
/// <summary>
/// 模板字符串
/// </summary>
public string TemplateStr { get; set; } = string.Empty;
/// <summary>
/// 生成路径
/// </summary>
public string BuildPath { get; set; }
/// <summary>
/// 模板名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Remarks { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using Volo.Abp.Application.Dtos;
namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Template
{
public class TemplateGetListInput : PagedAndSortedResultRequestDto
{
/// <summary>
/// 模板名称
/// </summary>
public string? Name { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
using Volo.Abp.Application.Services;
namespace Yi.Framework.CodeGen.Application.Contracts.IServices
{
public interface ICodeGenService : IApplicationService
{
}
}

View File

@@ -0,0 +1,9 @@
using Yi.Framework.CodeGen.Application.Contracts.Dtos.Field;
using Yi.Framework.Ddd.Application.Contracts;
namespace Yi.Framework.CodeGen.Application.Contracts.IServices
{
public interface IFieldService : IYiCrudAppService<FieldDto, Guid, FieldGetListInput>
{
}
}

View File

@@ -0,0 +1,9 @@
using Yi.Framework.CodeGen.Application.Contracts.Dtos.Table;
using Yi.Framework.Ddd.Application.Contracts;
namespace Yi.Framework.CodeGen.Application.Contracts.IServices
{
public interface ITableService : IYiCrudAppService<TableDto, Guid, TableGetListInput>
{
}
}

View File

@@ -0,0 +1,9 @@
using Yi.Framework.CodeGen.Application.Contracts.Dtos.Template;
using Yi.Framework.Ddd.Application.Contracts;
namespace Yi.Framework.CodeGen.Application.Contracts.IServices
{
public interface ITemplateService : IYiCrudAppService<TemplateDto, Guid, TemplateGetListInput>
{
}
}

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd.Application.Contracts\Yi.Framework.Ddd.Application.Contracts.csproj" />
<ProjectReference Include="..\Yi.Framework.CodeGen.Domain.Shared\Yi.Framework.CodeGen.Domain.Shared.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
using Yi.Framework.CodeGen.Domain.Shared;
using Yi.Framework.Ddd.Application.Contracts;
namespace Yi.Framework.CodeGen.Application.Contracts
{
[DependsOn(typeof(YiFrameworkCodeGenDomainSharedModule),
typeof(YiFrameworkDddApplicationContractsModule))]
public class YiFrameworkCodeGenApplicationContractsModule : AbpModule
{
}
}