vengine初步实现增删改查
This commit is contained in:
@@ -14,6 +14,14 @@
|
||||
<EmbeddedResource Remove="logs\**" />
|
||||
<None Remove="logs\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="wwwroot\Template\VengineSqlSugar\AppService.cshtml" />
|
||||
<None Include="wwwroot\Template\VengineSqlSugar\EntityDto.cshtml" />
|
||||
<None Include="wwwroot\Template\VengineSqlSugar\EntityDtoAcmen.cshtml" />
|
||||
<None Include="wwwroot\Template\VengineSqlSugar\EntityInfo.cshtml" />
|
||||
<None Include="wwwroot\Template\VengineSqlSugar\EntityInfoAcmen.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--<ItemGroup>
|
||||
<None Remove="lib\regworkerid_lib_v1.3.1\yitidgengo.dll" />
|
||||
@@ -43,6 +51,7 @@
|
||||
<ProjectReference Include="..\..\system\Tnb.OAuth\Tnb.OAuth.csproj" />
|
||||
<ProjectReference Include="..\..\system\Tnb.Systems\Tnb.Systems.csproj" />
|
||||
<ProjectReference Include="..\..\taskschedule\Tnb.TaskScheduler\Tnb.TaskScheduler.csproj" />
|
||||
<ProjectReference Include="..\..\visualdev\Tnb.Vengine\Tnb.Vengine.csproj" />
|
||||
<ProjectReference Include="..\..\visualdev\Tnb.VisualDev\Tnb.VisualDev.csproj" />
|
||||
<ProjectReference Include="..\..\WarehouseMgr\Tnb.WarehouseMgr\Tnb.WarehouseMgr.csproj" />
|
||||
<ProjectReference Include="..\..\workflow\Tnb.WorkFlow\Tnb.WorkFlow.csproj" />
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// 宁波拓通e智造平台 ToTong Next Builder //
|
||||
// https://git.tuotong-tech.com/tnb/tnb-server //
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@using Tnb.Core;
|
||||
@using Tnb.Vengine;
|
||||
@using Tnb.Vengine.Domain;
|
||||
@{
|
||||
AcmenVmodelContext context = Model;
|
||||
Vmodel vm = context.Vm;
|
||||
}
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Tnb.Core;
|
||||
using Tnb.Vengine.AppService;
|
||||
using Tnb.Vengine.DataAccess;
|
||||
using Tnb.Vengine.Domain;
|
||||
using @(context.NsPrefix + "." + vm.areaCode + ".Domain");
|
||||
|
||||
namespace @(context.NsPrefix + "." + vm.areaCode + ".AppService");
|
||||
|
||||
/// <summary>
|
||||
/// 模型 @vm.vmName 应用服务类
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = Consts.ApiGroupCode)]
|
||||
public class @(vm.vmCode)AppService : VengineAppService<@(vm.vmCode)>
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
public @(vm.vmCode)AppService(IDataAccess da) : base(da)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// 宁波拓通e智造平台 ToTong Next Builder //
|
||||
// https://git.tuotong-tech.com/tnb/tnb-server //
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@using Tnb.Core;
|
||||
@using Tnb.Vengine;
|
||||
@using Tnb.Vengine.Domain;
|
||||
@{
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
////////////////////////////////////////////////////
|
||||
// 本文件由拓通低代码开发平台自动生成,请不要修改 //
|
||||
// ________ ___ ________ //
|
||||
// /__ __/ / \ /__ __/ //
|
||||
// / / / / / / //
|
||||
// / / / / / / //
|
||||
// /__/ \___/ /__/ //
|
||||
// //
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@using Tnb.Core;
|
||||
@using Tnb.Vengine;
|
||||
@using Tnb.Vengine.Domain;
|
||||
@{
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// 宁波拓通e智造平台 ToTong Next Builder //
|
||||
// https://git.tuotong-tech.com/tnb/tnb-server //
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@using Tnb.Core;
|
||||
@using Tnb.Vengine;
|
||||
@using Tnb.Vengine.Domain;
|
||||
@{
|
||||
AcmenVmodelContext context = Model;
|
||||
Vmodel vm = context.Vm;
|
||||
}
|
||||
using Tnb.Core;
|
||||
|
||||
namespace @(context.NsPrefix + "." + vm.areaCode + ".Domain");
|
||||
|
||||
/// <summary>
|
||||
/// @vm.vmName
|
||||
/// </summary>
|
||||
public partial class @vm.vmCode
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
////////////////////////////////////////////////////
|
||||
// 本文件由拓通低代码开发平台自动生成,请不要修改 //
|
||||
// ________ ___ ________ //
|
||||
// /__ __/ / \ /__ __/ //
|
||||
// / / / / / / //
|
||||
// / / / / / / //
|
||||
// /__/ \___/ /__/ //
|
||||
// //
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@using JNPF.Common.Extension;
|
||||
@using Tnb.Core;
|
||||
@using Tnb.Vengine;
|
||||
@using Tnb.Vengine.Domain;
|
||||
@{
|
||||
AcmenVmodelContext context = Model;
|
||||
Vmodel vm = context.Vm;
|
||||
}
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SqlSugar;
|
||||
using Tnb.Core;
|
||||
using Yitter.IdGenerator;
|
||||
|
||||
namespace @(context.NsPrefix + "." + vm.areaCode + ".Domain");
|
||||
|
||||
/// <summary>
|
||||
/// @vm.vmName
|
||||
/// </summary>
|
||||
[SugarTable("@vm.tableName")]
|
||||
public partial class @vm.vmCode : Entity
|
||||
{
|
||||
#region Properties
|
||||
@foreach (var col in vm.dbProps.OrderBy(a=>a.ordinal)) {
|
||||
@:/// <summary>
|
||||
@:/// @col.name
|
||||
@:/// </summary>
|
||||
@col.GetAttributeString()
|
||||
@:public @(col.required ? col.csType : (col.csType + "?")) @col.code { get; set; }@(col.GetDefaultValueString())
|
||||
@:
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public override object[] GetKeys()
|
||||
{
|
||||
return new object[] { @(vm.dbProps.Where(a=>a.pkey).Select(a=>a.code).JoinAsString(", ")) };
|
||||
}
|
||||
|
||||
@foreach (var col in vm.dbProps.OrderBy(a => a.ordinal)){
|
||||
@://public @(col.required ? col.csType : (col.csType + "?")) @col.code { get; set; }@(col.GetDefaultValueString())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user