完善通用接口输入参数
This commit is contained in:
@@ -17,10 +17,15 @@ namespace @(context.NsPrefix + "." + vm.areaCode + ".AppService");
|
||||
/// <summary>
|
||||
/// @(vm.vmCode)Dto对象
|
||||
/// </summary>
|
||||
public partial class @(vm.vmCode)Dto
|
||||
{
|
||||
@foreach (var col in vm.dbProps.OrderBy(a => a.ordinal)){
|
||||
@://public @(col.required ? col.csType : (col.csType + "?")) @col.code { get; set; }@(col.GetDefaultValueString())
|
||||
}
|
||||
}
|
||||
public record @(vm.vmCode)Dto(@vm.GetPropStr(true, true));
|
||||
|
||||
public class @(vm.vmCode)CreateInput : VmEditInput
|
||||
{
|
||||
public new @(vm.vmCode)CreateData? data { get; set; }
|
||||
public override VmEditInput ToEditInput()
|
||||
{
|
||||
VmEditInput input = this;
|
||||
input.data = DObject.FromObject(data);
|
||||
return input;
|
||||
}
|
||||
}
|
||||
@@ -12,20 +12,15 @@
|
||||
@using Tnb.Vengine;
|
||||
@using Tnb.Vengine.Domain;
|
||||
@{
|
||||
AcmenVmodelContext context = Model;
|
||||
Vmodel vm = context.Vm;
|
||||
AcmenVmodelContext context = Model;
|
||||
Vmodel vm = context.Vm;
|
||||
}
|
||||
using Tnb.Core;
|
||||
|
||||
namespace @(context.NsPrefix + "." + vm.areaCode + ".AppService");
|
||||
|
||||
/// <summary>
|
||||
/// @(vm.vmCode)Dto对象
|
||||
/// </summary>
|
||||
public partial class @(vm.vmCode)Dto
|
||||
{
|
||||
@foreach (var col in vm.dbProps.OrderBy(a => a.ordinal)){
|
||||
@://public @(col.required ? col.csType : (col.csType + "?")) @col.code { get; set; }@(col.GetDefaultValueString())
|
||||
}
|
||||
}
|
||||
public record @(vm.vmCode)CreateData(@vm.GetPropStr(false, false));
|
||||
|
||||
public record @(vm.vmCode)UpdateData(@vm.GetPropStr(true, false));
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user