User.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import { FsUtils } from "../FsUtils/FsUtils";
  2. import { Data } from "./Data";
  3. /**
  4. * 用户数据
  5. */
  6. export class User extends Data {
  7. /**
  8. * 编号
  9. */
  10. public id: number;
  11. /**
  12. * 账号
  13. */
  14. public account: string;
  15. /**
  16. * 密码
  17. */
  18. public token: string;
  19. /**
  20. * 头像
  21. */
  22. public avator: string;
  23. /**
  24. * 昵称
  25. */
  26. public nickName: string;
  27. /**
  28. * 金币
  29. */
  30. public money: number = 0;
  31. /**
  32. * 10的次幂
  33. */
  34. // public moneyPower10: number = 0;
  35. /**
  36. * 神石
  37. */
  38. public diamond: number = 0;
  39. /**
  40. * 红包兑换可提 1:1000
  41. */
  42. public bonus: number = 0;
  43. /**
  44. * 贡献奖励可提 1:1000
  45. */
  46. public contribution: number = 0;
  47. /**
  48. *玩家等级
  49. */
  50. public lv: number = 0;
  51. // public get money(): number {
  52. // return this._money * Math.pow(10, this.moneyPower10);
  53. // }
  54. // public set money(money: number) {
  55. // let result = FsUtils.formateHugeNumber(money);
  56. // this._money = result.value;
  57. // this.moneyPower10 = result.power10;
  58. // }
  59. }