using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.Configuration;
using XCode.DataAccessLayer;
using NewLife;
namespace COMCMS.Core
{
/// 后台菜单对应的事件权限
[Serializable]
[DataObject]
[Description("后台菜单对应的事件权限")]
[BindTable("AdminMenuEvent", Description = "后台菜单对应的事件权限", ConnName = "dbconn", DbType = DatabaseType.SqlServer)]
public partial class AdminMenuEvent : IAdminMenuEvent
{
#region 属性
private Int32 _Id;
/// 编号
[DisplayName("编号")]
[Description("编号")]
[DataObjectField(true, true, false, 0)]
[BindColumn("Id", "编号", "int")]
public Int32 Id { get { return _Id; } set { if (OnPropertyChanging(__.Id, value)) { _Id = value; OnPropertyChanged(__.Id); } } }
private Int32 _MenuId;
/// 菜单ID
[DisplayName("菜单ID")]
[Description("菜单ID")]
[DataObjectField(false, false, false, 0)]
[BindColumn("MenuId", "菜单ID", "int")]
public Int32 MenuId { get { return _MenuId; } set { if (OnPropertyChanging(__.MenuId, value)) { _MenuId = value; OnPropertyChanged(__.MenuId); } } }
private String _MenuKey;
/// 菜单key
[DisplayName("菜单key")]
[Description("菜单key")]
[DataObjectField(false, false, true, 100)]
[BindColumn("MenuKey", "菜单key", "nvarchar(100)", Master = true)]
public String MenuKey { get { return _MenuKey; } set { if (OnPropertyChanging(__.MenuKey, value)) { _MenuKey = value; OnPropertyChanged(__.MenuKey); } } }
private Int32 _EventId;
/// 事件ID
[DisplayName("事件ID")]
[Description("事件ID")]
[DataObjectField(false, false, false, 0)]
[BindColumn("EventId", "事件ID", "int")]
public Int32 EventId { get { return _EventId; } set { if (OnPropertyChanging(__.EventId, value)) { _EventId = value; OnPropertyChanged(__.EventId); } } }
private String _EventKey;
/// 事件key
[DisplayName("事件key")]
[Description("事件key")]
[DataObjectField(false, false, true, 100)]
[BindColumn("EventKey", "事件key", "nvarchar(100)", Master = true)]
public String EventKey { get { return _EventKey; } set { if (OnPropertyChanging(__.EventKey, value)) { _EventKey = value; OnPropertyChanged(__.EventKey); } } }
private String _EventName;
/// 事件名称
[DisplayName("事件名称")]
[Description("事件名称")]
[DataObjectField(false, false, true, 100)]
[BindColumn("EventName", "事件名称", "nvarchar(100)")]
public String EventName { get { return _EventName; } set { if (OnPropertyChanging(__.EventName, value)) { _EventName = value; OnPropertyChanged(__.EventName); } } }
#endregion
#region 获取/设置 字段值
/// 获取/设置 字段值
/// 字段名
///
public override Object this[String name]
{
get
{
switch (name)
{
case __.Id : return _Id;
case __.MenuId : return _MenuId;
case __.MenuKey : return _MenuKey;
case __.EventId : return _EventId;
case __.EventKey : return _EventKey;
case __.EventName : return _EventName;
default: return base[name];
}
}
set
{
switch (name)
{
case __.Id : _Id = Convert.ToInt32(value); break;
case __.MenuId : _MenuId = Convert.ToInt32(value); break;
case __.MenuKey : _MenuKey = Convert.ToString(value); break;
case __.EventId : _EventId = Convert.ToInt32(value); break;
case __.EventKey : _EventKey = Convert.ToString(value); break;
case __.EventName : _EventName = Convert.ToString(value); break;
default: base[name] = value; break;
}
}
}
#endregion
#region 字段名
/// 取得后台菜单对应的事件权限字段信息的快捷方式
public partial class _
{
/// 编号
public static readonly Field Id = FindByName(__.Id);
/// 菜单ID
public static readonly Field MenuId = FindByName(__.MenuId);
/// 菜单key
public static readonly Field MenuKey = FindByName(__.MenuKey);
/// 事件ID
public static readonly Field EventId = FindByName(__.EventId);
/// 事件key
public static readonly Field EventKey = FindByName(__.EventKey);
/// 事件名称
public static readonly Field EventName = FindByName(__.EventName);
static Field FindByName(String name) { return Meta.Table.FindByName(name); }
}
/// 取得后台菜单对应的事件权限字段名称的快捷方式
public partial class __
{
/// 编号
public const String Id = "Id";
/// 菜单ID
public const String MenuId = "MenuId";
/// 菜单key
public const String MenuKey = "MenuKey";
/// 事件ID
public const String EventId = "EventId";
/// 事件key
public const String EventKey = "EventKey";
/// 事件名称
public const String EventName = "EventName";
}
#endregion
}
/// 后台菜单对应的事件权限接口
public partial interface IAdminMenuEvent
{
#region 属性
/// 编号
Int32 Id { get; set; }
/// 菜单ID
Int32 MenuId { get; set; }
/// 菜单key
String MenuKey { get; set; }
/// 事件ID
Int32 EventId { get; set; }
/// 事件key
String EventKey { get; set; }
/// 事件名称
String EventName { get; set; }
#endregion
#region 获取/设置 字段值
/// 获取/设置 字段值
/// 字段名
///
Object this[String name] { get; set; }
#endregion
}
}