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