You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

137 lines
4.0 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. namespace Learun.Application.Organization
  5. {
  6. /// <summary>
  7. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  8. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  9. /// 创建人:陈彬彬
  10. /// 日 期:2017.03.04
  11. /// 描 述:角色管理
  12. /// </summary>
  13. public class RoleEntity
  14. {
  15. #region 实体成员
  16. /// <summary>
  17. /// 角色主键
  18. /// </summary>
  19. /// <returns></returns>
  20. [Column("F_ROLEID")]
  21. public string F_RoleId { get; set; }
  22. /// <summary>
  23. /// 分类
  24. /// </summary>
  25. /// <returns></returns>
  26. [Column("F_CATEGORY")]
  27. public string F_Category { get; set; }
  28. /// <summary>
  29. /// 角色编码
  30. /// </summary>
  31. /// <returns></returns>
  32. [Column("F_ENCODE")]
  33. public string F_EnCode { get; set; }
  34. /// <summary>
  35. /// 角色名称
  36. /// </summary>
  37. /// <returns></returns>
  38. [Column("F_FULLNAME")]
  39. public string F_FullName { get; set; }
  40. /// <summary>
  41. /// 排序码
  42. /// </summary>
  43. /// <returns></returns>
  44. [Column("F_SORTCODE")]
  45. public int? F_SortCode { get; set; }
  46. /// <summary>
  47. /// 删除标记
  48. /// </summary>
  49. /// <returns></returns>
  50. [Column("F_DELETEMARK")]
  51. public int? F_DeleteMark { get; set; }
  52. /// <summary>
  53. /// 有效标志
  54. /// </summary>
  55. /// <returns></returns>
  56. [Column("F_ENABLEDMARK")]
  57. public int? F_EnabledMark { get; set; }
  58. /// <summary>
  59. /// 备注
  60. /// </summary>
  61. /// <returns></returns>
  62. [Column("F_DESCRIPTION")]
  63. public string F_Description { get; set; }
  64. /// <summary>
  65. /// 创建日期
  66. /// </summary>
  67. /// <returns></returns>
  68. [Column("F_CREATEDATE")]
  69. public DateTime? F_CreateDate { get; set; }
  70. /// <summary>
  71. /// 创建用户主键
  72. /// </summary>
  73. /// <returns></returns>
  74. [Column("F_CREATEUSERID")]
  75. public string F_CreateUserId { get; set; }
  76. /// <summary>
  77. /// 创建用户
  78. /// </summary>
  79. /// <returns></returns>
  80. [Column("F_CREATEUSERNAME")]
  81. public string F_CreateUserName { get; set; }
  82. /// <summary>
  83. /// 修改日期
  84. /// </summary>
  85. /// <returns></returns>
  86. [Column("F_MODIFYDATE")]
  87. public DateTime? F_ModifyDate { get; set; }
  88. /// <summary>
  89. /// 修改用户主键
  90. /// </summary>
  91. /// <returns></returns>
  92. [Column("F_MODIFYUSERID")]
  93. public string F_ModifyUserId { get; set; }
  94. /// <summary>
  95. /// 修改用户
  96. /// </summary>
  97. /// <returns></returns>
  98. [Column("F_MODIFYUSERNAME")]
  99. public string F_ModifyUserName { get; set; }
  100. [NotMapped]
  101. public string UserNum { get; set; }
  102. #endregion
  103. #region 扩展操作
  104. /// <summary>
  105. /// 新增调用
  106. /// </summary>
  107. public void Create()
  108. {
  109. UserInfo userInfo = LoginUserInfo.Get();
  110. this.F_CreateUserId = userInfo.userId;
  111. this.F_CreateUserName = userInfo.realName;
  112. this.F_RoleId = Guid.NewGuid().ToString();
  113. this.F_CreateDate = DateTime.Now;
  114. this.F_DeleteMark = 0;
  115. this.F_EnabledMark = 1;
  116. this.F_Category = "1";
  117. }
  118. /// <summary>
  119. /// 编辑调用
  120. /// </summary>
  121. /// <param name="keyValue">主键</param>
  122. public void Modify(string keyValue)
  123. {
  124. UserInfo userInfo = LoginUserInfo.Get();
  125. this.F_ModifyUserId = userInfo.userId;
  126. this.F_ModifyUserName = userInfo.realName;
  127. this.F_RoleId = keyValue;
  128. this.F_ModifyDate = DateTime.Now;
  129. }
  130. #endregion
  131. }
  132. }