using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Learun.Application.Organization
{
///
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创建人:陈彬彬
/// 日 期:2017.03.04
/// 描 述:角色管理
///
public class RoleEntity
{
#region 实体成员
///
/// 角色主键
///
///
[Column("F_ROLEID")]
public string F_RoleId { get; set; }
///
/// 分类
///
///
[Column("F_CATEGORY")]
public string F_Category { get; set; }
///
/// 角色编码
///
///
[Column("F_ENCODE")]
public string F_EnCode { get; set; }
///
/// 角色名称
///
///
[Column("F_FULLNAME")]
public string F_FullName { get; set; }
///
/// 排序码
///
///
[Column("F_SORTCODE")]
public int? F_SortCode { get; set; }
///
/// 删除标记
///
///
[Column("F_DELETEMARK")]
public int? F_DeleteMark { get; set; }
///
/// 有效标志
///
///
[Column("F_ENABLEDMARK")]
public int? F_EnabledMark { get; set; }
///
/// 备注
///
///
[Column("F_DESCRIPTION")]
public string F_Description { get; set; }
///
/// 创建日期
///
///
[Column("F_CREATEDATE")]
public DateTime? F_CreateDate { get; set; }
///
/// 创建用户主键
///
///
[Column("F_CREATEUSERID")]
public string F_CreateUserId { get; set; }
///
/// 创建用户
///
///
[Column("F_CREATEUSERNAME")]
public string F_CreateUserName { get; set; }
///
/// 修改日期
///
///
[Column("F_MODIFYDATE")]
public DateTime? F_ModifyDate { get; set; }
///
/// 修改用户主键
///
///
[Column("F_MODIFYUSERID")]
public string F_ModifyUserId { get; set; }
///
/// 修改用户
///
///
[Column("F_MODIFYUSERNAME")]
public string F_ModifyUserName { get; set; }
[NotMapped]
public string UserNum { get; set; }
#endregion
#region 扩展操作
///
/// 新增调用
///
public void Create()
{
UserInfo userInfo = LoginUserInfo.Get();
this.F_CreateUserId = userInfo.userId;
this.F_CreateUserName = userInfo.realName;
this.F_RoleId = Guid.NewGuid().ToString();
this.F_CreateDate = DateTime.Now;
this.F_DeleteMark = 0;
this.F_EnabledMark = 1;
this.F_Category = "1";
}
///
/// 编辑调用
///
/// 主键
public void Modify(string keyValue)
{
UserInfo userInfo = LoginUserInfo.Get();
this.F_ModifyUserId = userInfo.userId;
this.F_ModifyUserName = userInfo.realName;
this.F_RoleId = keyValue;
this.F_ModifyDate = DateTime.Now;
}
#endregion
}
}