模板重新生成可空类型

This commit is contained in:
陈淳
2023-01-06 11:12:47 +08:00
parent 576397a042
commit 29df3d658b
52 changed files with 573 additions and 478 deletions

View File

@@ -8,7 +8,7 @@ namespace Yi.Framework.DtoModel.Base.Dto
{
public class GiveRoleSetMenuDto
{
public List<long> RoleIds { get; set; }
public List<long> MenuIds { get; set; }
public List<long>? RoleIds { get; set; }
public List<long>? MenuIds { get; set; }
}
}

View File

@@ -9,8 +9,8 @@ namespace Yi.Framework.DtoModel.Base.Dto
{
public class RoleInfoDto
{
public RoleEntity Role { get; set; }
public List<long> DeptIds { get; set; }
public List<long> MenuIds { get; set; }
public RoleEntity Role { get; set; }=new ();
public List<long> DeptIds { get; set; } = new ();
public List<long> MenuIds { get; set; } = new ();
}
}

View File

@@ -8,7 +8,7 @@ namespace Yi.Framework.DtoModel.Base.Dto
{
public class UpdatePasswordDto
{
public string NewPassword { get; set; }
public string OldPassword { get; set; }
public string NewPassword { get; set; }=string.Empty;
public string OldPassword { get; set; } = string.Empty;
}
}

View File

@@ -10,9 +10,9 @@ namespace Yi.Framework.DtoModel.ERP.Material
{
public class MaterialCreateUpdateInput : EntityDto<long>
{
public string? Code { get; set; }
public string? Name { get; set; }
public string? UnitName { get; set; }
public string Code { get; set; }=string.Empty;
public string Name { get; set; }=string.Empty;
public string UnitName { get; set; }=string.Empty;
public string? Remarks { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Model.Base;
namespace Yi.Framework.DtoModel.ERP.Material
{
public class MaterialGetListInput
{
public string Code { get; set; }=string.Empty;
public string Name { get; set; }=string.Empty;
public string UnitName { get; set; }=string.Empty;
public string? Remarks { get; set; }
}
}

View File

@@ -9,9 +9,9 @@ namespace Yi.Framework.DtoModel.ERP.Material
{
public class MaterialGetListOutput: EntityDto<long>
{
public string Code { get; set; }
public string Name { get; set; }
public string UnitName { get; set; }
public string Remarks { get; set; }
public string Code { get; set; }=string.Empty;
public string Name { get; set; }=string.Empty;
public string UnitName { get; set; }=string.Empty;
public string? Remarks { get; set; }
}
}

View File

@@ -10,9 +10,9 @@ namespace Yi.Framework.DtoModel.ERP.Purchase
{
public class PurchaseGetListOutput: EntityDto<long>
{
public string Code { get; set; }
public string Code { get; set; } = string.Empty;
public DateTime NeedTime { get; set; }
public string Buyer { get; set; }
public string Buyer { get; set; } = string.Empty;
public long TotalMoney { get; set; }
public long PaidMoney { get; set; }
public PurchaseStateEnum PurchaseState { get; set; }

View File

@@ -10,12 +10,11 @@ namespace Yi.Framework.DtoModel.ERP.PurchaseDetails
{
public class PurchaseDetailsCreateUpdateInput : EntityDto<long>
{
public string? MaterialUnit { get; set; }
public string? MaterialName { get; set; }
public float UnitPrice { get; set; }
public long TotalNumber { get; set; }
public long? CompleteNumber { get; set; }
public string MaterialName { get; set; }=string.Empty;
public string MaterialUnit { get; set; }=string.Empty ;
public float UnitPrice { get; set; }
public long TotalNumber { get; set; }
public long CompleteNumber { get; set; }
public string? Remarks { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Model.Base;
namespace Yi.Framework.DtoModel.ERP.PurchaseDetails
{
public class PurchaseDetailsGetListInput
{
public string MaterialName { get; set; }=string.Empty;
public string MaterialUnit { get; set; }=string.Empty ;
public float UnitPrice { get; set; }
public long TotalNumber { get; set; }
public long CompleteNumber { get; set; }
public string? Remarks { get; set; }
}
}

View File

@@ -9,11 +9,11 @@ namespace Yi.Framework.DtoModel.ERP.PurchaseDetails
{
public class PurchaseDetailsGetListOutput: EntityDto<long>
{
public string MaterialName { get; set; }
public string MaterialUnit { get; set; }
public float UnitPrice { get; set; }
public long TotalNumber { get; set; }
public string MaterialName { get; set; }=string.Empty;
public string MaterialUnit { get; set; }=string.Empty ;
public float UnitPrice { get; set; }
public long TotalNumber { get; set; }
public long CompleteNumber { get; set; }
public string Remarks { get; set; }
public string? Remarks { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Model.Base;
namespace Yi.Framework.DtoModel.ERP.Supplier
{
public class SupplierGetListInput
{
public string Code { get; set; } = string.Empty;
public string Name { get; set; }= string.Empty;
public string? Address { get; set; }
public long? Phone { get; set; }
public string? Fax { get; set; }
public string? Email { get; set; }
}
}

View File

@@ -10,8 +10,8 @@ namespace Yi.Framework.DtoModel.ERP.Unit
{
public class UnitCreateUpdateInput : EntityDto<long>
{
public string? Code { get; set; }
public string? Name { get; set; }
public string Code { get; set; }=string.Empty;
public string Name { get; set; }=string.Empty;
public string? Remarks { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Model.Base;
namespace Yi.Framework.DtoModel.ERP.Unit
{
public class UnitGetListInput
{
public string Code { get; set; }=string.Empty;
public string Name { get; set; }=string.Empty;
public string? Remarks { get; set; }
}
}

View File

@@ -9,8 +9,8 @@ namespace Yi.Framework.DtoModel.ERP.Unit
{
public class UnitGetListOutput: EntityDto<long>
{
public string Code { get; set; }
public string Name { get; set; }
public string Remarks { get; set; }
public string Code { get; set; }=string.Empty;
public string Name { get; set; }=string.Empty;
public string? Remarks { get; set; }
}
}

View File

@@ -11,9 +11,9 @@ namespace Yi.Framework.DtoModel.ERP.Warehouse
{
public class WarehouseCreateUpdateInput : EntityDto<long>
{
public string? Code { get; set; }
public string? Name { get; set; }
public string Code { get; set; }=string.Empty;
public string Name { get; set; }=string.Empty ;
public string? Remarks { get; set; }
public StateEnum? State { get; set; }
public StateEnum State { get; set; } = StateEnum.Normal;
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Common.Enum;
using Yi.Framework.Model.Base;
namespace Yi.Framework.DtoModel.ERP.Warehouse
{
public class WarehouseGetListInput
{
public string Code { get; set; }=string.Empty;
public string Name { get; set; }=string.Empty ;
public string? Remarks { get; set; }
public StateEnum State { get; set; } = StateEnum.Normal;
}
}

View File

@@ -10,9 +10,9 @@ namespace Yi.Framework.DtoModel.ERP.Warehouse
{
public class WarehouseGetListOutput: EntityDto<long>
{
public string Code { get; set; }
public string Name { get; set; }
public string Remarks { get; set; }
public StateEnum State { get; set; }
public string Code { get; set; }=string.Empty;
public string Name { get; set; }=string.Empty ;
public string? Remarks { get; set; }
public StateEnum State { get; set; } = StateEnum.Normal;
}
}

View File

@@ -1,22 +0,0 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Model.RABC.Entitys;
namespace Yi.Framework.DtoModel.RABC.Student.MapperConfig
{
public class StudentProfile : Profile
{
public StudentProfile()
{
CreateMap<StudentCreateInput, StudentEntity>();
CreateMap<StudentUpdateInput, StudentEntity>();
CreateMap<StudentCreateUpdateInput, StudentEntity>();
CreateMap<StudentEntity, StudentGetOutput>();
CreateMap<StudentEntity, StudentListOutput>();
}
}
}

View File

@@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Yi.Framework.DtoModel.RABC.Student
{
public class StudentCreateInput
{
public string Name { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Yi.Framework.DtoModel.RABC.Student
{
public class StudentCreateUpdateInput
{
public string Name { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Yi.Framework.Model.Base;
namespace Yi.Framework.DtoModel.RABC.Student
{
public class StudentGetOutput : EntityDto<Guid>
{
public string Name { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Yi.Framework.Model.Base;
namespace Yi.Framework.DtoModel.RABC.Student
{
public class StudentListOutput : EntityDto<Guid>
{
public string Name { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Yi.Framework.DtoModel.RABC.Student
{
public class StudentUpdateInput
{
public string Name { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -7,6 +7,7 @@
<ItemGroup>
<Folder Include="BBS\" />
<Folder Include="RABC\" />
<Folder Include="Shop\" />
</ItemGroup>