Account.cs 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Runtime.Serialization;
  6. using Aitex.Core.Util;
  7. namespace Aitex.Core.Account
  8. {
  9. [Serializable]
  10. public class Account
  11. {
  12. /// <summary>
  13. /// get account name
  14. /// </summary>
  15. public string AccountId
  16. {
  17. get;
  18. set;
  19. }
  20. /// <summary>
  21. /// Account role name
  22. /// </summary>
  23. public string Role
  24. {
  25. get;
  26. set;
  27. }
  28. /// <summary>
  29. /// get user's real name
  30. /// </summary>
  31. public string RealName
  32. {
  33. get;
  34. set;
  35. }
  36. /// <summary>
  37. /// get user title, em, manager, ceo, engineer, operator, ..
  38. /// </summary>
  39. public string Touxian
  40. {
  41. get;
  42. set;
  43. }
  44. /// <summary>
  45. /// get user company name
  46. /// </summary>
  47. public string Company
  48. {
  49. get;
  50. set;
  51. }
  52. /// <summary>
  53. /// get user's department name
  54. /// </summary>
  55. public string Department
  56. {
  57. get;
  58. set;
  59. }
  60. /// <summary>
  61. /// get account status, enable|disable
  62. /// </summary>
  63. public bool AccountStatus
  64. {
  65. get;
  66. set;
  67. }
  68. /// <summary>
  69. /// get user's email address
  70. /// </summary>
  71. public string Email
  72. {
  73. get;
  74. set;
  75. }
  76. /// <summary>
  77. /// get user's telphone number
  78. /// </summary>
  79. public string Telephone
  80. {
  81. get;
  82. set;
  83. }
  84. /// <summary>
  85. /// get account's description
  86. /// </summary>
  87. public string Description
  88. {
  89. get;
  90. set;
  91. }
  92. /// <summary>
  93. /// get user last login time
  94. /// </summary>
  95. public string LastLoginTime
  96. {
  97. get;
  98. set;
  99. }
  100. /// <summary>
  101. /// get last update account update time
  102. /// </summary>
  103. public string LastAccountUpdateTime
  104. {
  105. get;
  106. set;
  107. }
  108. /// <summary>
  109. /// get account creation time
  110. /// </summary>
  111. public string AccountCreationTime
  112. {
  113. get;
  114. set;
  115. }
  116. /// <summary>
  117. /// Each view's access permission
  118. /// </summary>
  119. public SerializableDictionary<string, ViewPermission> Permission
  120. {
  121. get;
  122. set;
  123. }
  124. /// <summary>
  125. /// MD5 pwd
  126. /// </summary>
  127. public string Md5Pwd { get; set; }
  128. public string LoginIP { get; set; }
  129. }
  130. /// <summary>
  131. /// Login result
  132. /// </summary>
  133. [Serializable]
  134. public class LoginResult
  135. {
  136. /// <summary>
  137. /// login true/fail
  138. /// </summary>
  139. public bool ActSucc
  140. {
  141. get;
  142. set;
  143. }
  144. /// <summary>
  145. /// session id
  146. /// </summary>
  147. public String SessionId
  148. {
  149. get;
  150. set;
  151. }
  152. /// <summary>
  153. /// current login account info
  154. /// </summary>
  155. public Account AccountInfo
  156. {
  157. get;
  158. set;
  159. }
  160. /// <summary>
  161. /// login result description
  162. /// </summary>
  163. public String Description
  164. {
  165. get;
  166. set;
  167. }
  168. }
  169. /// <summary>
  170. /// create account account define
  171. /// </summary>
  172. [Serializable]
  173. public class CreateAccountResult
  174. {
  175. /// <summary>
  176. /// result true/false
  177. /// </summary>
  178. public bool ActSucc
  179. {
  180. get;
  181. set;
  182. }
  183. /// <summary>
  184. /// create account description
  185. /// </summary>
  186. public String Description
  187. {
  188. set;
  189. get;
  190. }
  191. }
  192. /// <summary>
  193. /// delete account result define
  194. /// </summary>
  195. [Serializable]
  196. public class DeleteAccountResult
  197. {
  198. /// <summary>
  199. /// delete account true/false
  200. /// </summary>
  201. public bool ActSucc
  202. {
  203. get;
  204. set;
  205. }
  206. /// <summary>
  207. /// delete account result description
  208. /// </summary>
  209. public String Description
  210. {
  211. set;
  212. get;
  213. }
  214. }
  215. /// <summary>
  216. /// Update account return result
  217. /// </summary>
  218. [Serializable]
  219. public class UpdateAccountResult
  220. {
  221. /// <summary>
  222. /// update account result, true/false
  223. /// </summary>
  224. public bool ActSucc
  225. {
  226. get;
  227. set;
  228. }
  229. /// <summary>
  230. /// update account result description
  231. /// </summary>
  232. public String Description
  233. {
  234. set;
  235. get;
  236. }
  237. }
  238. /// <summary>
  239. /// change password result define
  240. /// </summary>
  241. [Serializable]
  242. public class ChangePwdResult
  243. {
  244. /// <summary>
  245. /// result true/false
  246. /// </summary>
  247. public bool ActSucc
  248. {
  249. get;
  250. set;
  251. }
  252. /// <summary>
  253. /// change password description
  254. /// </summary>
  255. public String Description
  256. {
  257. set;
  258. get;
  259. }
  260. }
  261. /// <summary>
  262. /// get account list result define
  263. /// </summary>
  264. [Serializable]
  265. public class GetAccountListResult
  266. {
  267. /// <summary>
  268. /// get account list result true/false
  269. /// </summary>
  270. public bool ActSuccess
  271. {
  272. get;
  273. set;
  274. }
  275. /// <summary>
  276. /// get account list result
  277. /// </summary>
  278. public IEnumerable<Account> AccountList
  279. {
  280. get;
  281. set;
  282. }
  283. /// <summary>
  284. /// get account list description
  285. /// </summary>
  286. public String Description
  287. {
  288. get;
  289. set;
  290. }
  291. }
  292. /// <summary>
  293. /// get account info result define
  294. /// </summary>
  295. [Serializable]
  296. public class GetAccountInfoResult
  297. {
  298. /// <summary>
  299. /// get result true/false
  300. /// </summary>
  301. public bool ActSuccess
  302. {
  303. get;
  304. set;
  305. }
  306. /// <summary>
  307. /// specified account data
  308. /// </summary>
  309. public Account AccountInfo
  310. {
  311. get;
  312. set;
  313. }
  314. /// <summary>
  315. /// action result description
  316. /// </summary>
  317. public String Description
  318. {
  319. get;
  320. set;
  321. }
  322. }
  323. /// <summary>
  324. /// 角色权限设置
  325. /// </summary>
  326. [Serializable]
  327. [DataContract]
  328. public enum ViewPermission
  329. {
  330. [EnumMember]
  331. Invisiable = 0x1,
  332. [EnumMember]
  333. Readonly = 0x2,
  334. [EnumMember]
  335. PartlyControl = 0x3,
  336. [EnumMember]
  337. FullyControl = 0x4,
  338. /// <summary>
  339. /// 设定ProcessView界面中的OP权限
  340. /// </summary>
  341. [EnumMember]
  342. ProcessOPControl = 0x5,
  343. }
  344. }