更新实体类代码生成器
This commit is contained in:
parent
b6b6767283
commit
8e6b4c36e3
File diff suppressed because it is too large
Load Diff
|
@ -1,23 +1,26 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
using XCode;
|
||||
using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
|
||||
namespace AntJob.Data.Entity
|
||||
namespace AntJob.Data.Entity;
|
||||
|
||||
/// <summary>作业</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("作业")]
|
||||
[BindIndex("IU_Job_AppID_Name", true, "AppID,Name")]
|
||||
[BindTable("Job", Description = "作业", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class Job
|
||||
{
|
||||
/// <summary>作业</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("作业")]
|
||||
[BindIndex("IU_Job_AppID_Name", true, "AppID,Name")]
|
||||
[BindTable("Job", Description = "作业", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class Job
|
||||
{
|
||||
#region 属性
|
||||
private Int32 _ID;
|
||||
/// <summary>编号</summary>
|
||||
|
@ -314,49 +317,46 @@ namespace AntJob.Data.Entity
|
|||
/// <returns></returns>
|
||||
public override Object this[String name]
|
||||
{
|
||||
get
|
||||
get => name switch
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "ID": return _ID;
|
||||
case "AppID": return _AppID;
|
||||
case "Name": return _Name;
|
||||
case "ClassName": return _ClassName;
|
||||
case "DisplayName": return _DisplayName;
|
||||
case "Mode": return _Mode;
|
||||
case "Topic": return _Topic;
|
||||
case "MessageCount": return _MessageCount;
|
||||
case "Start": return _Start;
|
||||
case "End": return _End;
|
||||
case "Step": return _Step;
|
||||
case "BatchSize": return _BatchSize;
|
||||
case "Offset": return _Offset;
|
||||
case "MaxTask": return _MaxTask;
|
||||
case "MaxError": return _MaxError;
|
||||
case "MaxRetry": return _MaxRetry;
|
||||
case "MaxTime": return _MaxTime;
|
||||
case "MaxRetain": return _MaxRetain;
|
||||
case "MaxIdle": return _MaxIdle;
|
||||
case "ErrorDelay": return _ErrorDelay;
|
||||
case "Total": return _Total;
|
||||
case "Success": return _Success;
|
||||
case "Error": return _Error;
|
||||
case "Times": return _Times;
|
||||
case "Speed": return _Speed;
|
||||
case "Enable": return _Enable;
|
||||
case "Data": return _Data;
|
||||
case "Remark": return _Remark;
|
||||
case "CreateUserID": return _CreateUserID;
|
||||
case "CreateUser": return _CreateUser;
|
||||
case "CreateTime": return _CreateTime;
|
||||
case "CreateIP": return _CreateIP;
|
||||
case "UpdateUserID": return _UpdateUserID;
|
||||
case "UpdateUser": return _UpdateUser;
|
||||
case "UpdateTime": return _UpdateTime;
|
||||
case "UpdateIP": return _UpdateIP;
|
||||
default: return base[name];
|
||||
}
|
||||
}
|
||||
"ID" => _ID,
|
||||
"AppID" => _AppID,
|
||||
"Name" => _Name,
|
||||
"ClassName" => _ClassName,
|
||||
"DisplayName" => _DisplayName,
|
||||
"Mode" => _Mode,
|
||||
"Topic" => _Topic,
|
||||
"MessageCount" => _MessageCount,
|
||||
"Start" => _Start,
|
||||
"End" => _End,
|
||||
"Step" => _Step,
|
||||
"BatchSize" => _BatchSize,
|
||||
"Offset" => _Offset,
|
||||
"MaxTask" => _MaxTask,
|
||||
"MaxError" => _MaxError,
|
||||
"MaxRetry" => _MaxRetry,
|
||||
"MaxTime" => _MaxTime,
|
||||
"MaxRetain" => _MaxRetain,
|
||||
"MaxIdle" => _MaxIdle,
|
||||
"ErrorDelay" => _ErrorDelay,
|
||||
"Total" => _Total,
|
||||
"Success" => _Success,
|
||||
"Error" => _Error,
|
||||
"Times" => _Times,
|
||||
"Speed" => _Speed,
|
||||
"Enable" => _Enable,
|
||||
"Data" => _Data,
|
||||
"Remark" => _Remark,
|
||||
"CreateUserID" => _CreateUserID,
|
||||
"CreateUser" => _CreateUser,
|
||||
"CreateTime" => _CreateTime,
|
||||
"CreateIP" => _CreateIP,
|
||||
"UpdateUserID" => _UpdateUserID,
|
||||
"UpdateUser" => _UpdateUser,
|
||||
"UpdateTime" => _UpdateTime,
|
||||
"UpdateIP" => _UpdateIP,
|
||||
_ => base[name]
|
||||
};
|
||||
set
|
||||
{
|
||||
switch (name)
|
||||
|
@ -403,6 +403,9 @@ namespace AntJob.Data.Entity
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 关联映射
|
||||
#endregion
|
||||
|
||||
#region 字段名
|
||||
/// <summary>取得作业字段信息的快捷方式</summary>
|
||||
public partial class _
|
||||
|
@ -630,5 +633,4 @@ namespace AntJob.Data.Entity
|
|||
public const String UpdateIP = "UpdateIP";
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
|
@ -88,6 +88,32 @@ namespace AntJob.Data.Entity
|
|||
{
|
||||
return FindAll(_.JobID == jobid & _.CreateTime < createTime, _.CreateTime.Desc(), null, 0, 1).FirstOrDefault();
|
||||
}
|
||||
|
||||
/// <summary>根据作业、状态、开始查找</summary>
|
||||
/// <param name="jobId">作业</param>
|
||||
/// <param name="status">状态</param>
|
||||
/// <param name="start">开始</param>
|
||||
/// <returns>实体列表</returns>
|
||||
public static IList<JobTask> FindAllByJobIDAndStatusAndStart(Int32 jobId, JobStatus status, DateTime start)
|
||||
{
|
||||
// 实体缓存
|
||||
if (Meta.Session.Count < 1000) return Meta.Cache.FindAll(e => e.JobID == jobId && e.Status == status && e.Start == start);
|
||||
|
||||
return FindAll(_.JobID == jobId & _.Status == status & _.Start == start);
|
||||
}
|
||||
|
||||
/// <summary>根据应用、客户端、状态查找</summary>
|
||||
/// <param name="appId">应用</param>
|
||||
/// <param name="client">客户端</param>
|
||||
/// <param name="status">状态</param>
|
||||
/// <returns>实体列表</returns>
|
||||
public static IList<JobTask> FindAllByAppIDAndClientAndStatus(Int32 appId, String client, JobStatus status)
|
||||
{
|
||||
// 实体缓存
|
||||
if (Meta.Session.Count < 1000) return Meta.Cache.FindAll(e => e.AppID == appId && e.Client.EqualIgnoreCase(client) && e.Status == status);
|
||||
|
||||
return FindAll(_.AppID == appId & _.Client == client & _.Status == status);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
|
|
@ -1,25 +1,28 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
using XCode;
|
||||
using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
|
||||
namespace AntJob.Data.Entity
|
||||
namespace AntJob.Data.Entity;
|
||||
|
||||
/// <summary>作业任务</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("作业任务")]
|
||||
[BindIndex("IX_JobTask_JobID_Status_Start", false, "JobID,Status,Start")]
|
||||
[BindIndex("IX_JobTask_AppID_Client_Status", false, "AppID,Client,Status")]
|
||||
[BindIndex("IX_JobTask_JobID_CreateTime", false, "JobID,CreateTime")]
|
||||
[BindTable("JobTask", Description = "作业任务", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class JobTask
|
||||
{
|
||||
/// <summary>作业任务</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("作业任务")]
|
||||
[BindIndex("IX_JobTask_JobID_Status_Start", false, "JobID,Status,Start")]
|
||||
[BindIndex("IX_JobTask_AppID_Client_Status", false, "AppID,Client,Status")]
|
||||
[BindIndex("IX_JobTask_JobID_CreateTime", false, "JobID,CreateTime")]
|
||||
[BindTable("JobTask", Description = "作业任务", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class JobTask
|
||||
{
|
||||
#region 属性
|
||||
private Int32 _ID;
|
||||
/// <summary>编号</summary>
|
||||
|
@ -212,36 +215,33 @@ namespace AntJob.Data.Entity
|
|||
/// <returns></returns>
|
||||
public override Object this[String name]
|
||||
{
|
||||
get
|
||||
get => name switch
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "ID": return _ID;
|
||||
case "AppID": return _AppID;
|
||||
case "JobID": return _JobID;
|
||||
case "Client": return _Client;
|
||||
case "Start": return _Start;
|
||||
case "End": return _End;
|
||||
case "BatchSize": return _BatchSize;
|
||||
case "Total": return _Total;
|
||||
case "Success": return _Success;
|
||||
case "Error": return _Error;
|
||||
case "Times": return _Times;
|
||||
case "Speed": return _Speed;
|
||||
case "Cost": return _Cost;
|
||||
case "FullCost": return _FullCost;
|
||||
case "Status": return _Status;
|
||||
case "MsgCount": return _MsgCount;
|
||||
case "Server": return _Server;
|
||||
case "ProcessID": return _ProcessID;
|
||||
case "Key": return _Key;
|
||||
case "Data": return _Data;
|
||||
case "Message": return _Message;
|
||||
case "CreateTime": return _CreateTime;
|
||||
case "UpdateTime": return _UpdateTime;
|
||||
default: return base[name];
|
||||
}
|
||||
}
|
||||
"ID" => _ID,
|
||||
"AppID" => _AppID,
|
||||
"JobID" => _JobID,
|
||||
"Client" => _Client,
|
||||
"Start" => _Start,
|
||||
"End" => _End,
|
||||
"BatchSize" => _BatchSize,
|
||||
"Total" => _Total,
|
||||
"Success" => _Success,
|
||||
"Error" => _Error,
|
||||
"Times" => _Times,
|
||||
"Speed" => _Speed,
|
||||
"Cost" => _Cost,
|
||||
"FullCost" => _FullCost,
|
||||
"Status" => _Status,
|
||||
"MsgCount" => _MsgCount,
|
||||
"Server" => _Server,
|
||||
"ProcessID" => _ProcessID,
|
||||
"Key" => _Key,
|
||||
"Data" => _Data,
|
||||
"Message" => _Message,
|
||||
"CreateTime" => _CreateTime,
|
||||
"UpdateTime" => _UpdateTime,
|
||||
_ => base[name]
|
||||
};
|
||||
set
|
||||
{
|
||||
switch (name)
|
||||
|
@ -275,6 +275,9 @@ namespace AntJob.Data.Entity
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 关联映射
|
||||
#endregion
|
||||
|
||||
#region 字段名
|
||||
/// <summary>取得作业任务字段信息的快捷方式</summary>
|
||||
public partial class _
|
||||
|
@ -424,5 +427,4 @@ namespace AntJob.Data.Entity
|
|||
public const String UpdateTime = "UpdateTime";
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Xml.Serialization;
|
||||
|
@ -68,6 +68,32 @@ namespace AntJob.Data.Entity
|
|||
|
||||
return Find(_.ID == id);
|
||||
}
|
||||
|
||||
/// <summary>根据应用查找</summary>
|
||||
/// <param name="appId">应用</param>
|
||||
/// <returns>实体列表</returns>
|
||||
public static IList<JobError> FindAllByAppID(Int32 appId)
|
||||
{
|
||||
if (appId <= 0) return new List<JobError>();
|
||||
|
||||
// 实体缓存
|
||||
if (Meta.Session.Count < 1000) return Meta.Cache.FindAll(e => e.AppID == appId);
|
||||
|
||||
return FindAll(_.AppID == appId);
|
||||
}
|
||||
|
||||
/// <summary>根据作业查找</summary>
|
||||
/// <param name="jobId">作业</param>
|
||||
/// <returns>实体列表</returns>
|
||||
public static IList<JobError> FindAllByJobID(Int32 jobId)
|
||||
{
|
||||
if (jobId <= 0) return new List<JobError>();
|
||||
|
||||
// 实体缓存
|
||||
if (Meta.Session.Count < 1000) return Meta.Cache.FindAll(e => e.JobID == jobId);
|
||||
|
||||
return FindAll(_.JobID == jobId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
|
|
@ -1,24 +1,27 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
using XCode;
|
||||
using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
|
||||
namespace AntJob.Data.Entity
|
||||
namespace AntJob.Data.Entity;
|
||||
|
||||
/// <summary>作业错误</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("作业错误")]
|
||||
[BindIndex("IX_JobError_AppID_ID", false, "AppID,ID")]
|
||||
[BindIndex("IX_JobError_JobID_ID", false, "JobID,ID")]
|
||||
[BindTable("JobError", Description = "作业错误", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class JobError
|
||||
{
|
||||
/// <summary>作业错误</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("作业错误")]
|
||||
[BindIndex("IX_JobError_AppID_ID", false, "AppID,ID")]
|
||||
[BindIndex("IX_JobError_JobID_ID", false, "JobID,ID")]
|
||||
[BindTable("JobError", Description = "作业错误", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class JobError
|
||||
{
|
||||
#region 属性
|
||||
private Int32 _ID;
|
||||
/// <summary>编号</summary>
|
||||
|
@ -131,26 +134,23 @@ namespace AntJob.Data.Entity
|
|||
/// <returns></returns>
|
||||
public override Object this[String name]
|
||||
{
|
||||
get
|
||||
get => name switch
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "ID": return _ID;
|
||||
case "AppID": return _AppID;
|
||||
case "JobID": return _JobID;
|
||||
case "TaskID": return _TaskID;
|
||||
case "Client": return _Client;
|
||||
case "Start": return _Start;
|
||||
case "End": return _End;
|
||||
case "Data": return _Data;
|
||||
case "Server": return _Server;
|
||||
case "ProcessID": return _ProcessID;
|
||||
case "Message": return _Message;
|
||||
case "CreateTime": return _CreateTime;
|
||||
case "UpdateTime": return _UpdateTime;
|
||||
default: return base[name];
|
||||
}
|
||||
}
|
||||
"ID" => _ID,
|
||||
"AppID" => _AppID,
|
||||
"JobID" => _JobID,
|
||||
"TaskID" => _TaskID,
|
||||
"Client" => _Client,
|
||||
"Start" => _Start,
|
||||
"End" => _End,
|
||||
"Data" => _Data,
|
||||
"Server" => _Server,
|
||||
"ProcessID" => _ProcessID,
|
||||
"Message" => _Message,
|
||||
"CreateTime" => _CreateTime,
|
||||
"UpdateTime" => _UpdateTime,
|
||||
_ => base[name]
|
||||
};
|
||||
set
|
||||
{
|
||||
switch (name)
|
||||
|
@ -174,6 +174,9 @@ namespace AntJob.Data.Entity
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 关联映射
|
||||
#endregion
|
||||
|
||||
#region 字段名
|
||||
/// <summary>取得作业错误字段信息的快捷方式</summary>
|
||||
public partial class _
|
||||
|
@ -263,5 +266,4 @@ namespace AntJob.Data.Entity
|
|||
public const String UpdateTime = "UpdateTime";
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
|
@ -54,6 +54,33 @@ namespace AntJob.Data.Entity
|
|||
#endregion
|
||||
|
||||
#region 扩展查询
|
||||
/// <summary>根据编号查找</summary>
|
||||
/// <param name="id">编号</param>
|
||||
/// <returns>实体对象</returns>
|
||||
public static AppHistory FindById(Int64 id)
|
||||
{
|
||||
if (id <= 0) return null;
|
||||
|
||||
// 实体缓存
|
||||
if (Meta.Session.Count < 1000) return Meta.Cache.Find(e => e.Id == id);
|
||||
|
||||
// 单对象缓存
|
||||
return Meta.SingleCache[id];
|
||||
|
||||
//return Find(_.Id == id);
|
||||
}
|
||||
|
||||
/// <summary>根据应用、操作查找</summary>
|
||||
/// <param name="appId">应用</param>
|
||||
/// <param name="action">操作</param>
|
||||
/// <returns>实体列表</returns>
|
||||
public static IList<AppHistory> FindAllByAppIDAndAction(Int32 appId, String action)
|
||||
{
|
||||
// 实体缓存
|
||||
if (Meta.Session.Count < 1000) return Meta.Cache.FindAll(e => e.AppID == appId && e.Action.EqualIgnoreCase(action));
|
||||
|
||||
return FindAll(_.AppID == appId & _.Action == action);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
|
|
@ -1,23 +1,26 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
using XCode;
|
||||
using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
|
||||
namespace AntJob.Data.Entity
|
||||
namespace AntJob.Data.Entity;
|
||||
|
||||
/// <summary>应用历史。应用的操作历史</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("应用历史。应用的操作历史")]
|
||||
[BindIndex("IX_AppHistory_AppID_Action", false, "AppID,Action")]
|
||||
[BindTable("AppHistory", Description = "应用历史。应用的操作历史", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class AppHistory
|
||||
{
|
||||
/// <summary>应用历史。应用的操作历史</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("应用历史。应用的操作历史")]
|
||||
[BindIndex("IX_AppHistory_AppID_Action", false, "AppID,Action")]
|
||||
[BindTable("AppHistory", Description = "应用历史。应用的操作历史", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class AppHistory
|
||||
{
|
||||
#region 属性
|
||||
private Int64 _Id;
|
||||
/// <summary>编号</summary>
|
||||
|
@ -114,24 +117,21 @@ namespace AntJob.Data.Entity
|
|||
/// <returns></returns>
|
||||
public override Object this[String name]
|
||||
{
|
||||
get
|
||||
get => name switch
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "Id": return _Id;
|
||||
case "AppID": return _AppID;
|
||||
case "Name": return _Name;
|
||||
case "Action": return _Action;
|
||||
case "Success": return _Success;
|
||||
case "Version": return _Version;
|
||||
case "CompileTime": return _CompileTime;
|
||||
case "Server": return _Server;
|
||||
case "CreateTime": return _CreateTime;
|
||||
case "CreateIP": return _CreateIP;
|
||||
case "Remark": return _Remark;
|
||||
default: return base[name];
|
||||
}
|
||||
}
|
||||
"Id" => _Id,
|
||||
"AppID" => _AppID,
|
||||
"Name" => _Name,
|
||||
"Action" => _Action,
|
||||
"Success" => _Success,
|
||||
"Version" => _Version,
|
||||
"CompileTime" => _CompileTime,
|
||||
"Server" => _Server,
|
||||
"CreateTime" => _CreateTime,
|
||||
"CreateIP" => _CreateIP,
|
||||
"Remark" => _Remark,
|
||||
_ => base[name]
|
||||
};
|
||||
set
|
||||
{
|
||||
switch (name)
|
||||
|
@ -153,6 +153,9 @@ namespace AntJob.Data.Entity
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 关联映射
|
||||
#endregion
|
||||
|
||||
#region 字段名
|
||||
/// <summary>取得应用历史字段信息的快捷方式</summary>
|
||||
public partial class _
|
||||
|
@ -230,5 +233,4 @@ namespace AntJob.Data.Entity
|
|||
public const String Remark = "Remark";
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Xml.Serialization;
|
||||
|
@ -71,6 +71,19 @@ namespace AntJob.Data.Entity
|
|||
|
||||
return FindAll(_.AppID == appid);
|
||||
}
|
||||
|
||||
/// <summary>根据客户端查找</summary>
|
||||
/// <param name="client">客户端</param>
|
||||
/// <returns>实体列表</returns>
|
||||
public static IList<AppOnline> FindAllByClient(String client)
|
||||
{
|
||||
if (client.IsNullOrEmpty()) return new List<AppOnline>();
|
||||
|
||||
// 实体缓存
|
||||
if (Meta.Session.Count < 1000) return Meta.Cache.FindAll(e => e.Client.EqualIgnoreCase(client));
|
||||
|
||||
return FindAll(_.Client == client);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 高级查询
|
||||
|
|
|
@ -1,25 +1,28 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
using XCode;
|
||||
using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
|
||||
namespace AntJob.Data.Entity
|
||||
namespace AntJob.Data.Entity;
|
||||
|
||||
/// <summary>应用在线。各应用多实例在线</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("应用在线。各应用多实例在线")]
|
||||
[BindIndex("IU_AppOnline_Instance", true, "Instance")]
|
||||
[BindIndex("IX_AppOnline_Client", false, "Client")]
|
||||
[BindIndex("IX_AppOnline_AppID", false, "AppID")]
|
||||
[BindTable("AppOnline", Description = "应用在线。各应用多实例在线", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class AppOnline
|
||||
{
|
||||
/// <summary>应用在线。各应用多实例在线</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("应用在线。各应用多实例在线")]
|
||||
[BindIndex("IU_AppOnline_Instance", true, "Instance")]
|
||||
[BindIndex("IX_AppOnline_Client", false, "Client")]
|
||||
[BindIndex("IX_AppOnline_AppID", false, "AppID")]
|
||||
[BindTable("AppOnline", Description = "应用在线。各应用多实例在线", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class AppOnline
|
||||
{
|
||||
#region 属性
|
||||
private Int32 _ID;
|
||||
/// <summary>编号</summary>
|
||||
|
@ -188,33 +191,30 @@ namespace AntJob.Data.Entity
|
|||
/// <returns></returns>
|
||||
public override Object this[String name]
|
||||
{
|
||||
get
|
||||
get => name switch
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "ID": return _ID;
|
||||
case "AppID": return _AppID;
|
||||
case "Instance": return _Instance;
|
||||
case "Client": return _Client;
|
||||
case "Name": return _Name;
|
||||
case "ProcessId": return _ProcessId;
|
||||
case "Version": return _Version;
|
||||
case "CompileTime": return _CompileTime;
|
||||
case "Server": return _Server;
|
||||
case "Tasks": return _Tasks;
|
||||
case "Total": return _Total;
|
||||
case "Success": return _Success;
|
||||
case "Error": return _Error;
|
||||
case "Cost": return _Cost;
|
||||
case "Speed": return _Speed;
|
||||
case "LastKey": return _LastKey;
|
||||
case "CreateTime": return _CreateTime;
|
||||
case "CreateIP": return _CreateIP;
|
||||
case "UpdateTime": return _UpdateTime;
|
||||
case "UpdateIP": return _UpdateIP;
|
||||
default: return base[name];
|
||||
}
|
||||
}
|
||||
"ID" => _ID,
|
||||
"AppID" => _AppID,
|
||||
"Instance" => _Instance,
|
||||
"Client" => _Client,
|
||||
"Name" => _Name,
|
||||
"ProcessId" => _ProcessId,
|
||||
"Version" => _Version,
|
||||
"CompileTime" => _CompileTime,
|
||||
"Server" => _Server,
|
||||
"Tasks" => _Tasks,
|
||||
"Total" => _Total,
|
||||
"Success" => _Success,
|
||||
"Error" => _Error,
|
||||
"Cost" => _Cost,
|
||||
"Speed" => _Speed,
|
||||
"LastKey" => _LastKey,
|
||||
"CreateTime" => _CreateTime,
|
||||
"CreateIP" => _CreateIP,
|
||||
"UpdateTime" => _UpdateTime,
|
||||
"UpdateIP" => _UpdateIP,
|
||||
_ => base[name]
|
||||
};
|
||||
set
|
||||
{
|
||||
switch (name)
|
||||
|
@ -245,6 +245,9 @@ namespace AntJob.Data.Entity
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 关联映射
|
||||
#endregion
|
||||
|
||||
#region 字段名
|
||||
/// <summary>取得应用在线字段信息的快捷方式</summary>
|
||||
public partial class _
|
||||
|
@ -376,5 +379,4 @@ namespace AntJob.Data.Entity
|
|||
public const String UpdateIP = "UpdateIP";
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,23 +1,26 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
using XCode;
|
||||
using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
|
||||
namespace AntJob.Data.Entity
|
||||
namespace AntJob.Data.Entity;
|
||||
|
||||
/// <summary>应用消息。消息调度,某些作业负责生产消息,供其它作业进行消费处理</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("应用消息。消息调度,某些作业负责生产消息,供其它作业进行消费处理")]
|
||||
[BindIndex("IX_AppMessage_AppID_Topic_UpdateTime", false, "AppID,Topic,UpdateTime")]
|
||||
[BindTable("AppMessage", Description = "应用消息。消息调度,某些作业负责生产消息,供其它作业进行消费处理", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class AppMessage
|
||||
{
|
||||
/// <summary>应用消息。消息调度,某些作业负责生产消息,供其它作业进行消费处理</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("应用消息。消息调度,某些作业负责生产消息,供其它作业进行消费处理")]
|
||||
[BindIndex("IX_AppMessage_AppID_Topic_UpdateTime", false, "AppID,Topic,UpdateTime")]
|
||||
[BindTable("AppMessage", Description = "应用消息。消息调度,某些作业负责生产消息,供其它作业进行消费处理", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class AppMessage
|
||||
{
|
||||
#region 属性
|
||||
private Int64 _Id;
|
||||
/// <summary>编号</summary>
|
||||
|
@ -82,20 +85,17 @@ namespace AntJob.Data.Entity
|
|||
/// <returns></returns>
|
||||
public override Object this[String name]
|
||||
{
|
||||
get
|
||||
get => name switch
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "Id": return _Id;
|
||||
case "AppID": return _AppID;
|
||||
case "JobID": return _JobID;
|
||||
case "Topic": return _Topic;
|
||||
case "Data": return _Data;
|
||||
case "CreateTime": return _CreateTime;
|
||||
case "UpdateTime": return _UpdateTime;
|
||||
default: return base[name];
|
||||
}
|
||||
}
|
||||
"Id" => _Id,
|
||||
"AppID" => _AppID,
|
||||
"JobID" => _JobID,
|
||||
"Topic" => _Topic,
|
||||
"Data" => _Data,
|
||||
"CreateTime" => _CreateTime,
|
||||
"UpdateTime" => _UpdateTime,
|
||||
_ => base[name]
|
||||
};
|
||||
set
|
||||
{
|
||||
switch (name)
|
||||
|
@ -113,6 +113,9 @@ namespace AntJob.Data.Entity
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 关联映射
|
||||
#endregion
|
||||
|
||||
#region 字段名
|
||||
/// <summary>取得应用消息字段信息的快捷方式</summary>
|
||||
public partial class _
|
||||
|
@ -166,5 +169,4 @@ namespace AntJob.Data.Entity
|
|||
public const String UpdateTime = "UpdateTime";
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,23 +1,26 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
using XCode;
|
||||
using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
|
||||
namespace AntJob.Data.Entity
|
||||
namespace AntJob.Data.Entity;
|
||||
|
||||
/// <summary>应用系统。数据作业隶属于某个应用</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("应用系统。数据作业隶属于某个应用")]
|
||||
[BindIndex("IU_App_Name", true, "Name")]
|
||||
[BindTable("App", Description = "应用系统。数据作业隶属于某个应用", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class App
|
||||
{
|
||||
/// <summary>应用系统。数据作业隶属于某个应用</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("应用系统。数据作业隶属于某个应用")]
|
||||
[BindIndex("IU_App_Name", true, "Name")]
|
||||
[BindTable("App", Description = "应用系统。数据作业隶属于某个应用", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class App
|
||||
{
|
||||
#region 属性
|
||||
private Int32 _ID;
|
||||
/// <summary>编号</summary>
|
||||
|
@ -178,32 +181,29 @@ namespace AntJob.Data.Entity
|
|||
/// <returns></returns>
|
||||
public override Object this[String name]
|
||||
{
|
||||
get
|
||||
get => name switch
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "ID": return _ID;
|
||||
case "Name": return _Name;
|
||||
case "DisplayName": return _DisplayName;
|
||||
case "Secret": return _Secret;
|
||||
case "Category": return _Category;
|
||||
case "Version": return _Version;
|
||||
case "CompileTime": return _CompileTime;
|
||||
case "Enable": return _Enable;
|
||||
case "JobCount": return _JobCount;
|
||||
case "MessageCount": return _MessageCount;
|
||||
case "Remark": return _Remark;
|
||||
case "CreateUserID": return _CreateUserID;
|
||||
case "CreateUser": return _CreateUser;
|
||||
case "CreateTime": return _CreateTime;
|
||||
case "CreateIP": return _CreateIP;
|
||||
case "UpdateUserID": return _UpdateUserID;
|
||||
case "UpdateUser": return _UpdateUser;
|
||||
case "UpdateTime": return _UpdateTime;
|
||||
case "UpdateIP": return _UpdateIP;
|
||||
default: return base[name];
|
||||
}
|
||||
}
|
||||
"ID" => _ID,
|
||||
"Name" => _Name,
|
||||
"DisplayName" => _DisplayName,
|
||||
"Secret" => _Secret,
|
||||
"Category" => _Category,
|
||||
"Version" => _Version,
|
||||
"CompileTime" => _CompileTime,
|
||||
"Enable" => _Enable,
|
||||
"JobCount" => _JobCount,
|
||||
"MessageCount" => _MessageCount,
|
||||
"Remark" => _Remark,
|
||||
"CreateUserID" => _CreateUserID,
|
||||
"CreateUser" => _CreateUser,
|
||||
"CreateTime" => _CreateTime,
|
||||
"CreateIP" => _CreateIP,
|
||||
"UpdateUserID" => _UpdateUserID,
|
||||
"UpdateUser" => _UpdateUser,
|
||||
"UpdateTime" => _UpdateTime,
|
||||
"UpdateIP" => _UpdateIP,
|
||||
_ => base[name]
|
||||
};
|
||||
set
|
||||
{
|
||||
switch (name)
|
||||
|
@ -233,6 +233,9 @@ namespace AntJob.Data.Entity
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 关联映射
|
||||
#endregion
|
||||
|
||||
#region 字段名
|
||||
/// <summary>取得应用系统字段信息的快捷方式</summary>
|
||||
public partial class _
|
||||
|
@ -358,5 +361,4 @@ namespace AntJob.Data.Entity
|
|||
public const String UpdateIP = "UpdateIP";
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,24 +1,27 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
using XCode;
|
||||
using XCode.Cache;
|
||||
using XCode.Configuration;
|
||||
using XCode.DataAccessLayer;
|
||||
|
||||
namespace AntJob.Data.Entity
|
||||
namespace AntJob.Data.Entity;
|
||||
|
||||
/// <summary>应用配置。各应用的配置数据</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("应用配置。各应用的配置数据")]
|
||||
[BindIndex("IU_AppConfig_AppID_Name", true, "AppID,Name")]
|
||||
[BindIndex("IX_AppConfig_UpdateTime", false, "UpdateTime")]
|
||||
[BindTable("AppConfig", Description = "应用配置。各应用的配置数据", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class AppConfig
|
||||
{
|
||||
/// <summary>应用配置。各应用的配置数据</summary>
|
||||
[Serializable]
|
||||
[DataObject]
|
||||
[Description("应用配置。各应用的配置数据")]
|
||||
[BindIndex("IU_AppConfig_AppID_Name", true, "AppID,Name")]
|
||||
[BindIndex("IX_AppConfig_UpdateTime", false, "UpdateTime")]
|
||||
[BindTable("AppConfig", Description = "应用配置。各应用的配置数据", ConnName = "Ant", DbType = DatabaseType.None)]
|
||||
public partial class AppConfig
|
||||
{
|
||||
#region 属性
|
||||
private Int32 _ID;
|
||||
/// <summary>编号</summary>
|
||||
|
@ -107,23 +110,20 @@ namespace AntJob.Data.Entity
|
|||
/// <returns></returns>
|
||||
public override Object this[String name]
|
||||
{
|
||||
get
|
||||
get => name switch
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "ID": return _ID;
|
||||
case "AppID": return _AppID;
|
||||
case "Name": return _Name;
|
||||
case "Content": return _Content;
|
||||
case "CreateUserID": return _CreateUserID;
|
||||
case "CreateTime": return _CreateTime;
|
||||
case "CreateIP": return _CreateIP;
|
||||
case "UpdateUserID": return _UpdateUserID;
|
||||
case "UpdateTime": return _UpdateTime;
|
||||
case "UpdateIP": return _UpdateIP;
|
||||
default: return base[name];
|
||||
}
|
||||
}
|
||||
"ID" => _ID,
|
||||
"AppID" => _AppID,
|
||||
"Name" => _Name,
|
||||
"Content" => _Content,
|
||||
"CreateUserID" => _CreateUserID,
|
||||
"CreateTime" => _CreateTime,
|
||||
"CreateIP" => _CreateIP,
|
||||
"UpdateUserID" => _UpdateUserID,
|
||||
"UpdateTime" => _UpdateTime,
|
||||
"UpdateIP" => _UpdateIP,
|
||||
_ => base[name]
|
||||
};
|
||||
set
|
||||
{
|
||||
switch (name)
|
||||
|
@ -144,6 +144,9 @@ namespace AntJob.Data.Entity
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 关联映射
|
||||
#endregion
|
||||
|
||||
#region 字段名
|
||||
/// <summary>取得应用配置字段信息的快捷方式</summary>
|
||||
public partial class _
|
||||
|
@ -215,5 +218,4 @@ namespace AntJob.Data.Entity
|
|||
public const String UpdateIP = "UpdateIP";
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,5 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Tables xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://www.newlifex.com http://www.newlifex.com/Model2022.xsd" Output="Entity" NameSpace="AntJob.Data.Entity" ConnName="Ant" BaseClass="EntityBase" Version="11.0.2022.0405" Document="https://www.yuque.com/smartstone/xcode/model" xmlns="http://www.newlifex.com/Model2022.xsd">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<EntityModel xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="https://newlifex.com https://newlifex.com/Model202309.xsd" Version="11.0.2022.0405" Document="https://newlifex.com/xcode/model" xmlns="https://newlifex.com/Model202309.xsd">
|
||||
<Option>
|
||||
<!--类名模板。其中{name}替换为Table.Name,如{name}Model/I{name}Dto等-->
|
||||
<ClassNameTemplate />
|
||||
<!--显示名模板。其中{displayName}替换为Table.DisplayName-->
|
||||
<DisplayNameTemplate />
|
||||
<!--基类。可能包含基类和接口,其中{name}替换为Table.Name-->
|
||||
<BaseClass>Entity</BaseClass>
|
||||
<!--命名空间-->
|
||||
<Namespace>AntJob.Data.Entity</Namespace>
|
||||
<!--输出目录-->
|
||||
<Output>Entity</Output>
|
||||
<!--是否使用中文文件名。默认false-->
|
||||
<ChineseFileName>False</ChineseFileName>
|
||||
<!--用于生成Copy函数的参数类型。例如{name}或I{name}-->
|
||||
<ModelNameForCopy />
|
||||
<!--带有索引器。实现IModel接口-->
|
||||
<HasIModel>False</HasIModel>
|
||||
<!--可为null上下文。生成String?等-->
|
||||
<Nullable>False</Nullable>
|
||||
<!--数据库连接名-->
|
||||
<ConnName>Ant</ConnName>
|
||||
<!--模型类模版。设置后生成模型类,用于接口数据传输,例如{name}Model-->
|
||||
<ModelClass />
|
||||
<!--模型类输出目录。默认当前目录的Models子目录-->
|
||||
<ModelsOutput>.\Models\</ModelsOutput>
|
||||
<!--模型接口模版。设置后生成模型接口,用于约束模型类和实体类,例如I{name}-->
|
||||
<ModelInterface />
|
||||
<!--模型接口输出目录。默认当前目录的Interfaces子目录-->
|
||||
<InterfacesOutput>.\Interfaces\</InterfacesOutput>
|
||||
<!--用户实体转为模型类的模型类。例如{name}或{name}DTO-->
|
||||
<ModelNameForToModel />
|
||||
<!--命名格式。Default/Upper/Lower/Underline-->
|
||||
<NameFormat>Default</NameFormat>
|
||||
<!--魔方区域显示名-->
|
||||
<DisplayName />
|
||||
<!--魔方控制器输出目录-->
|
||||
<CubeOutput />
|
||||
</Option>
|
||||
<Tables>
|
||||
<Table Name="App" Description="应用系统。数据作业隶属于某个应用">
|
||||
<Columns>
|
||||
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
|
||||
|
@ -201,4 +240,5 @@
|
|||
<Index Columns="AppID,Topic,UpdateTime" />
|
||||
</Indexes>
|
||||
</Table>
|
||||
</Tables>
|
||||
</Tables>
|
||||
</EntityModel>
|
Binary file not shown.
Loading…
Reference in New Issue