LocalModels.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. export namespace LocalModels {
  2. function beanToObject(bean: object) {
  3. let result = {}
  4. Object.keys(bean).forEach(function (key) {
  5. result[key] = bean[key]
  6. })
  7. return result
  8. }
  9. export class Area {
  10. sheng: string
  11. shi: string
  12. qu: string
  13. weidu: number
  14. jingdu: number
  15. hour: number
  16. minute: number
  17. second: number
  18. shiPinYin: string
  19. quPinYin: string
  20. }
  21. export class BaseRequest {
  22. toData() {
  23. return beanToObject(this)
  24. }
  25. }
  26. export class UserRequest extends BaseRequest {
  27. user_name: string = ""
  28. is_man: boolean = false
  29. date_mode: number = 0
  30. born_year: number = 0
  31. born_month: number = 0
  32. born_day: number = 0
  33. know_time: number = 0
  34. born_hour: number = 0
  35. born_minute: number = 0
  36. born_sheng: string = ""
  37. born_shi: string = ""
  38. born_qu: string = ""
  39. open_id: string = ""
  40. }
  41. }