448 lines
19 KiB
C#
448 lines
19 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using XCode;
|
|
using XCode.Configuration;
|
|
using XCode.DataAccessLayer;
|
|
|
|
namespace Stardust.Data
|
|
{
|
|
/// <summary>应用系统。服务提供者和消费者</summary>
|
|
[Serializable]
|
|
[DataObject]
|
|
[Description("应用系统。服务提供者和消费者")]
|
|
[BindIndex("IU_App_Name", true, "Name")]
|
|
[BindTable("App", Description = "应用系统。服务提供者和消费者", ConnName = "Stardust", DbType = DatabaseType.None)]
|
|
public partial class App : IApp
|
|
{
|
|
#region 属性
|
|
private Int32 _ID;
|
|
/// <summary>编号</summary>
|
|
[DisplayName("编号")]
|
|
[Description("编号")]
|
|
[DataObjectField(true, true, false, 0)]
|
|
[BindColumn("ID", "编号", "")]
|
|
public Int32 ID { get { return _ID; } set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }
|
|
|
|
private String _Name;
|
|
/// <summary>名称</summary>
|
|
[DisplayName("名称")]
|
|
[Description("名称")]
|
|
[DataObjectField(false, false, false, 50)]
|
|
[BindColumn("Name", "名称", "", Master = true)]
|
|
public String Name { get { return _Name; } set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } } }
|
|
|
|
private String _DisplayName;
|
|
/// <summary>显示名</summary>
|
|
[DisplayName("显示名")]
|
|
[Description("显示名")]
|
|
[DataObjectField(false, false, true, 50)]
|
|
[BindColumn("DisplayName", "显示名", "")]
|
|
public String DisplayName { get { return _DisplayName; } set { if (OnPropertyChanging(__.DisplayName, value)) { _DisplayName = value; OnPropertyChanged(__.DisplayName); } } }
|
|
|
|
private String _Secret;
|
|
/// <summary>密钥</summary>
|
|
[DisplayName("密钥")]
|
|
[Description("密钥")]
|
|
[DataObjectField(false, false, true, 50)]
|
|
[BindColumn("Secret", "密钥", "")]
|
|
public String Secret { get { return _Secret; } set { if (OnPropertyChanging(__.Secret, value)) { _Secret = value; OnPropertyChanged(__.Secret); } } }
|
|
|
|
private String _Version;
|
|
/// <summary>版本</summary>
|
|
[DisplayName("版本")]
|
|
[Description("版本")]
|
|
[DataObjectField(false, false, true, 50)]
|
|
[BindColumn("Version", "版本", "")]
|
|
public String Version { get { return _Version; } set { if (OnPropertyChanging(__.Version, value)) { _Version = value; OnPropertyChanged(__.Version); } } }
|
|
|
|
private DateTime _Compile;
|
|
/// <summary>编译时间</summary>
|
|
[DisplayName("编译时间")]
|
|
[Description("编译时间")]
|
|
[DataObjectField(false, false, true, 0)]
|
|
[BindColumn("Compile", "编译时间", "")]
|
|
public DateTime Compile { get { return _Compile; } set { if (OnPropertyChanging(__.Compile, value)) { _Compile = value; OnPropertyChanged(__.Compile); } } }
|
|
|
|
private Boolean _Enable;
|
|
/// <summary>启用</summary>
|
|
[DisplayName("启用")]
|
|
[Description("启用")]
|
|
[DataObjectField(false, false, false, 0)]
|
|
[BindColumn("Enable", "启用", "")]
|
|
public Boolean Enable { get { return _Enable; } set { if (OnPropertyChanging(__.Enable, value)) { _Enable = value; OnPropertyChanged(__.Enable); } } }
|
|
|
|
private Int32 _Services;
|
|
/// <summary>服务数。该应用提供的服务数</summary>
|
|
[DisplayName("服务数")]
|
|
[Description("服务数。该应用提供的服务数")]
|
|
[DataObjectField(false, false, false, 0)]
|
|
[BindColumn("Services", "服务数。该应用提供的服务数", "")]
|
|
public Int32 Services { get { return _Services; } set { if (OnPropertyChanging(__.Services, value)) { _Services = value; OnPropertyChanged(__.Services); } } }
|
|
|
|
private Int32 _Actions;
|
|
/// <summary>功能数。该应用提供的功能数</summary>
|
|
[DisplayName("功能数")]
|
|
[Description("功能数。该应用提供的功能数")]
|
|
[DataObjectField(false, false, false, 0)]
|
|
[BindColumn("Actions", "功能数。该应用提供的功能数", "")]
|
|
public Int32 Actions { get { return _Actions; } set { if (OnPropertyChanging(__.Actions, value)) { _Actions = value; OnPropertyChanged(__.Actions); } } }
|
|
|
|
private DateTime _LastLogin;
|
|
/// <summary>最后登录</summary>
|
|
[DisplayName("最后登录")]
|
|
[Description("最后登录")]
|
|
[DataObjectField(false, false, true, 0)]
|
|
[BindColumn("LastLogin", "最后登录", "")]
|
|
public DateTime LastLogin { get { return _LastLogin; } set { if (OnPropertyChanging(__.LastLogin, value)) { _LastLogin = value; OnPropertyChanged(__.LastLogin); } } }
|
|
|
|
private String _LastIP;
|
|
/// <summary>最后IP</summary>
|
|
[DisplayName("最后IP")]
|
|
[Description("最后IP")]
|
|
[DataObjectField(false, false, true, 50)]
|
|
[BindColumn("LastIP", "最后IP", "")]
|
|
public String LastIP { get { return _LastIP; } set { if (OnPropertyChanging(__.LastIP, value)) { _LastIP = value; OnPropertyChanged(__.LastIP); } } }
|
|
|
|
private String _Remark;
|
|
/// <summary>内容</summary>
|
|
[DisplayName("内容")]
|
|
[Description("内容")]
|
|
[DataObjectField(false, false, true, 500)]
|
|
[BindColumn("Remark", "内容", "")]
|
|
public String Remark { get { return _Remark; } set { if (OnPropertyChanging(__.Remark, value)) { _Remark = value; OnPropertyChanged(__.Remark); } } }
|
|
|
|
private String _CreateUser;
|
|
/// <summary>创建者</summary>
|
|
[DisplayName("创建者")]
|
|
[Description("创建者")]
|
|
[DataObjectField(false, false, true, 50)]
|
|
[BindColumn("CreateUser", "创建者", "")]
|
|
public String CreateUser { get { return _CreateUser; } set { if (OnPropertyChanging(__.CreateUser, value)) { _CreateUser = value; OnPropertyChanged(__.CreateUser); } } }
|
|
|
|
private Int32 _CreateUserID;
|
|
/// <summary>创建者</summary>
|
|
[DisplayName("创建者")]
|
|
[Description("创建者")]
|
|
[DataObjectField(false, false, false, 0)]
|
|
[BindColumn("CreateUserID", "创建者", "")]
|
|
public Int32 CreateUserID { get { return _CreateUserID; } set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } } }
|
|
|
|
private DateTime _CreateTime;
|
|
/// <summary>创建时间</summary>
|
|
[DisplayName("创建时间")]
|
|
[Description("创建时间")]
|
|
[DataObjectField(false, false, true, 0)]
|
|
[BindColumn("CreateTime", "创建时间", "")]
|
|
public DateTime CreateTime { get { return _CreateTime; } set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }
|
|
|
|
private String _CreateIP;
|
|
/// <summary>创建地址</summary>
|
|
[DisplayName("创建地址")]
|
|
[Description("创建地址")]
|
|
[DataObjectField(false, false, true, 50)]
|
|
[BindColumn("CreateIP", "创建地址", "")]
|
|
public String CreateIP { get { return _CreateIP; } set { if (OnPropertyChanging(__.CreateIP, value)) { _CreateIP = value; OnPropertyChanged(__.CreateIP); } } }
|
|
|
|
private String _UpdateUser;
|
|
/// <summary>更新者</summary>
|
|
[DisplayName("更新者")]
|
|
[Description("更新者")]
|
|
[DataObjectField(false, false, true, 50)]
|
|
[BindColumn("UpdateUser", "更新者", "")]
|
|
public String UpdateUser { get { return _UpdateUser; } set { if (OnPropertyChanging(__.UpdateUser, value)) { _UpdateUser = value; OnPropertyChanged(__.UpdateUser); } } }
|
|
|
|
private Int32 _UpdateUserID;
|
|
/// <summary>更新者</summary>
|
|
[DisplayName("更新者")]
|
|
[Description("更新者")]
|
|
[DataObjectField(false, false, false, 0)]
|
|
[BindColumn("UpdateUserID", "更新者", "")]
|
|
public Int32 UpdateUserID { get { return _UpdateUserID; } set { if (OnPropertyChanging(__.UpdateUserID, value)) { _UpdateUserID = value; OnPropertyChanged(__.UpdateUserID); } } }
|
|
|
|
private DateTime _UpdateTime;
|
|
/// <summary>更新时间</summary>
|
|
[DisplayName("更新时间")]
|
|
[Description("更新时间")]
|
|
[DataObjectField(false, false, true, 0)]
|
|
[BindColumn("UpdateTime", "更新时间", "")]
|
|
public DateTime UpdateTime { get { return _UpdateTime; } set { if (OnPropertyChanging(__.UpdateTime, value)) { _UpdateTime = value; OnPropertyChanged(__.UpdateTime); } } }
|
|
|
|
private String _UpdateIP;
|
|
/// <summary>更新地址</summary>
|
|
[DisplayName("更新地址")]
|
|
[Description("更新地址")]
|
|
[DataObjectField(false, false, true, 50)]
|
|
[BindColumn("UpdateIP", "更新地址", "")]
|
|
public String UpdateIP { get { return _UpdateIP; } set { if (OnPropertyChanging(__.UpdateIP, value)) { _UpdateIP = value; OnPropertyChanged(__.UpdateIP); } } }
|
|
#endregion
|
|
|
|
#region 获取/设置 字段值
|
|
/// <summary>获取/设置 字段值</summary>
|
|
/// <param name="name">字段名</param>
|
|
/// <returns></returns>
|
|
public override Object this[String name]
|
|
{
|
|
get
|
|
{
|
|
switch (name)
|
|
{
|
|
case __.ID : return _ID;
|
|
case __.Name : return _Name;
|
|
case __.DisplayName : return _DisplayName;
|
|
case __.Secret : return _Secret;
|
|
case __.Version : return _Version;
|
|
case __.Compile : return _Compile;
|
|
case __.Enable : return _Enable;
|
|
case __.Services : return _Services;
|
|
case __.Actions : return _Actions;
|
|
case __.LastLogin : return _LastLogin;
|
|
case __.LastIP : return _LastIP;
|
|
case __.Remark : return _Remark;
|
|
case __.CreateUser : return _CreateUser;
|
|
case __.CreateUserID : return _CreateUserID;
|
|
case __.CreateTime : return _CreateTime;
|
|
case __.CreateIP : return _CreateIP;
|
|
case __.UpdateUser : return _UpdateUser;
|
|
case __.UpdateUserID : return _UpdateUserID;
|
|
case __.UpdateTime : return _UpdateTime;
|
|
case __.UpdateIP : return _UpdateIP;
|
|
default: return base[name];
|
|
}
|
|
}
|
|
set
|
|
{
|
|
switch (name)
|
|
{
|
|
case __.ID : _ID = Convert.ToInt32(value); break;
|
|
case __.Name : _Name = Convert.ToString(value); break;
|
|
case __.DisplayName : _DisplayName = Convert.ToString(value); break;
|
|
case __.Secret : _Secret = Convert.ToString(value); break;
|
|
case __.Version : _Version = Convert.ToString(value); break;
|
|
case __.Compile : _Compile = Convert.ToDateTime(value); break;
|
|
case __.Enable : _Enable = Convert.ToBoolean(value); break;
|
|
case __.Services : _Services = Convert.ToInt32(value); break;
|
|
case __.Actions : _Actions = Convert.ToInt32(value); break;
|
|
case __.LastLogin : _LastLogin = Convert.ToDateTime(value); break;
|
|
case __.LastIP : _LastIP = Convert.ToString(value); break;
|
|
case __.Remark : _Remark = Convert.ToString(value); break;
|
|
case __.CreateUser : _CreateUser = Convert.ToString(value); break;
|
|
case __.CreateUserID : _CreateUserID = Convert.ToInt32(value); break;
|
|
case __.CreateTime : _CreateTime = Convert.ToDateTime(value); break;
|
|
case __.CreateIP : _CreateIP = Convert.ToString(value); break;
|
|
case __.UpdateUser : _UpdateUser = Convert.ToString(value); break;
|
|
case __.UpdateUserID : _UpdateUserID = Convert.ToInt32(value); break;
|
|
case __.UpdateTime : _UpdateTime = Convert.ToDateTime(value); break;
|
|
case __.UpdateIP : _UpdateIP = Convert.ToString(value); break;
|
|
default: base[name] = value; break;
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 字段名
|
|
/// <summary>取得应用系统字段信息的快捷方式</summary>
|
|
public partial class _
|
|
{
|
|
/// <summary>编号</summary>
|
|
public static readonly Field ID = FindByName(__.ID);
|
|
|
|
/// <summary>名称</summary>
|
|
public static readonly Field Name = FindByName(__.Name);
|
|
|
|
/// <summary>显示名</summary>
|
|
public static readonly Field DisplayName = FindByName(__.DisplayName);
|
|
|
|
/// <summary>密钥</summary>
|
|
public static readonly Field Secret = FindByName(__.Secret);
|
|
|
|
/// <summary>版本</summary>
|
|
public static readonly Field Version = FindByName(__.Version);
|
|
|
|
/// <summary>编译时间</summary>
|
|
public static readonly Field Compile = FindByName(__.Compile);
|
|
|
|
/// <summary>启用</summary>
|
|
public static readonly Field Enable = FindByName(__.Enable);
|
|
|
|
/// <summary>服务数。该应用提供的服务数</summary>
|
|
public static readonly Field Services = FindByName(__.Services);
|
|
|
|
/// <summary>功能数。该应用提供的功能数</summary>
|
|
public static readonly Field Actions = FindByName(__.Actions);
|
|
|
|
/// <summary>最后登录</summary>
|
|
public static readonly Field LastLogin = FindByName(__.LastLogin);
|
|
|
|
/// <summary>最后IP</summary>
|
|
public static readonly Field LastIP = FindByName(__.LastIP);
|
|
|
|
/// <summary>内容</summary>
|
|
public static readonly Field Remark = FindByName(__.Remark);
|
|
|
|
/// <summary>创建者</summary>
|
|
public static readonly Field CreateUser = FindByName(__.CreateUser);
|
|
|
|
/// <summary>创建者</summary>
|
|
public static readonly Field CreateUserID = FindByName(__.CreateUserID);
|
|
|
|
/// <summary>创建时间</summary>
|
|
public static readonly Field CreateTime = FindByName(__.CreateTime);
|
|
|
|
/// <summary>创建地址</summary>
|
|
public static readonly Field CreateIP = FindByName(__.CreateIP);
|
|
|
|
/// <summary>更新者</summary>
|
|
public static readonly Field UpdateUser = FindByName(__.UpdateUser);
|
|
|
|
/// <summary>更新者</summary>
|
|
public static readonly Field UpdateUserID = FindByName(__.UpdateUserID);
|
|
|
|
/// <summary>更新时间</summary>
|
|
public static readonly Field UpdateTime = FindByName(__.UpdateTime);
|
|
|
|
/// <summary>更新地址</summary>
|
|
public static readonly Field UpdateIP = FindByName(__.UpdateIP);
|
|
|
|
static Field FindByName(String name) { return Meta.Table.FindByName(name); }
|
|
}
|
|
|
|
/// <summary>取得应用系统字段名称的快捷方式</summary>
|
|
public partial class __
|
|
{
|
|
/// <summary>编号</summary>
|
|
public const String ID = "ID";
|
|
|
|
/// <summary>名称</summary>
|
|
public const String Name = "Name";
|
|
|
|
/// <summary>显示名</summary>
|
|
public const String DisplayName = "DisplayName";
|
|
|
|
/// <summary>密钥</summary>
|
|
public const String Secret = "Secret";
|
|
|
|
/// <summary>版本</summary>
|
|
public const String Version = "Version";
|
|
|
|
/// <summary>编译时间</summary>
|
|
public const String Compile = "Compile";
|
|
|
|
/// <summary>启用</summary>
|
|
public const String Enable = "Enable";
|
|
|
|
/// <summary>服务数。该应用提供的服务数</summary>
|
|
public const String Services = "Services";
|
|
|
|
/// <summary>功能数。该应用提供的功能数</summary>
|
|
public const String Actions = "Actions";
|
|
|
|
/// <summary>最后登录</summary>
|
|
public const String LastLogin = "LastLogin";
|
|
|
|
/// <summary>最后IP</summary>
|
|
public const String LastIP = "LastIP";
|
|
|
|
/// <summary>内容</summary>
|
|
public const String Remark = "Remark";
|
|
|
|
/// <summary>创建者</summary>
|
|
public const String CreateUser = "CreateUser";
|
|
|
|
/// <summary>创建者</summary>
|
|
public const String CreateUserID = "CreateUserID";
|
|
|
|
/// <summary>创建时间</summary>
|
|
public const String CreateTime = "CreateTime";
|
|
|
|
/// <summary>创建地址</summary>
|
|
public const String CreateIP = "CreateIP";
|
|
|
|
/// <summary>更新者</summary>
|
|
public const String UpdateUser = "UpdateUser";
|
|
|
|
/// <summary>更新者</summary>
|
|
public const String UpdateUserID = "UpdateUserID";
|
|
|
|
/// <summary>更新时间</summary>
|
|
public const String UpdateTime = "UpdateTime";
|
|
|
|
/// <summary>更新地址</summary>
|
|
public const String UpdateIP = "UpdateIP";
|
|
}
|
|
#endregion
|
|
}
|
|
|
|
/// <summary>应用系统。服务提供者和消费者接口</summary>
|
|
public partial interface IApp
|
|
{
|
|
#region 属性
|
|
/// <summary>编号</summary>
|
|
Int32 ID { get; set; }
|
|
|
|
/// <summary>名称</summary>
|
|
String Name { get; set; }
|
|
|
|
/// <summary>显示名</summary>
|
|
String DisplayName { get; set; }
|
|
|
|
/// <summary>密钥</summary>
|
|
String Secret { get; set; }
|
|
|
|
/// <summary>版本</summary>
|
|
String Version { get; set; }
|
|
|
|
/// <summary>编译时间</summary>
|
|
DateTime Compile { get; set; }
|
|
|
|
/// <summary>启用</summary>
|
|
Boolean Enable { get; set; }
|
|
|
|
/// <summary>服务数。该应用提供的服务数</summary>
|
|
Int32 Services { get; set; }
|
|
|
|
/// <summary>功能数。该应用提供的功能数</summary>
|
|
Int32 Actions { get; set; }
|
|
|
|
/// <summary>最后登录</summary>
|
|
DateTime LastLogin { get; set; }
|
|
|
|
/// <summary>最后IP</summary>
|
|
String LastIP { get; set; }
|
|
|
|
/// <summary>内容</summary>
|
|
String Remark { get; set; }
|
|
|
|
/// <summary>创建者</summary>
|
|
String CreateUser { get; set; }
|
|
|
|
/// <summary>创建者</summary>
|
|
Int32 CreateUserID { get; set; }
|
|
|
|
/// <summary>创建时间</summary>
|
|
DateTime CreateTime { get; set; }
|
|
|
|
/// <summary>创建地址</summary>
|
|
String CreateIP { get; set; }
|
|
|
|
/// <summary>更新者</summary>
|
|
String UpdateUser { get; set; }
|
|
|
|
/// <summary>更新者</summary>
|
|
Int32 UpdateUserID { get; set; }
|
|
|
|
/// <summary>更新时间</summary>
|
|
DateTime UpdateTime { get; set; }
|
|
|
|
/// <summary>更新地址</summary>
|
|
String UpdateIP { get; set; }
|
|
#endregion
|
|
|
|
#region 获取/设置 字段值
|
|
/// <summary>获取/设置 字段值</summary>
|
|
/// <param name="name">字段名</param>
|
|
/// <returns></returns>
|
|
Object this[String name] { get; set; }
|
|
#endregion
|
|
}
|
|
} |