Event.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import { Str, Uid } from 'pinia-orm/dist/decorators'
  2. import ApiModel from '~/models/ApiModel'
  3. import {Assert, IriEncoded} from '~/models/decorators'
  4. import {Attr, Num} from "pinia-orm/decorators";
  5. import File from "~/models/Core/File";
  6. import Place from "~/models/Place/Place";
  7. import Country from "~/models/Core/Country";
  8. /**
  9. * AP2i Model : Freemium / Event
  10. *
  11. * */
  12. export default class Event extends ApiModel {
  13. static entity = 'freemium/events'
  14. @Uid()
  15. declare id: number | string | null
  16. @Str(null)
  17. @Assert({'nullable': false, 'max':255})
  18. declare name: string | null
  19. @Str(null)
  20. @Assert({'nullable': false})
  21. declare datetimeStart: string
  22. @Str(null)
  23. @Assert({'nullable': false})
  24. declare datetimeEnd: string
  25. @Str(null)
  26. declare description: string
  27. @Attr(null)
  28. @IriEncoded(File)
  29. declare image: number | null
  30. @Str(null)
  31. declare url: string
  32. @Str(null)
  33. declare urlTicket: string
  34. @Attr(null)
  35. @IriEncoded(Place)
  36. declare place: number | null
  37. @Str(null)
  38. declare placeName: string | null
  39. @Str(null)
  40. declare streetAddress: string | null
  41. @Str(null)
  42. declare streetAddressSecond: string | null
  43. @Str(null)
  44. declare streetAddressThird: string | null
  45. @Str(null)
  46. declare postalCode: string | null
  47. @Str(null)
  48. declare addressCity: string | null
  49. @IriEncoded(Country)
  50. @Attr(null)
  51. declare addressCountry: number | null
  52. @Num(null)
  53. declare latitude: number | null
  54. @Num(null)
  55. declare longitude: number | null
  56. @Str('FREE')
  57. declare pricing: string | null
  58. @Num(null)
  59. declare priceMini: number | null
  60. @Num(null)
  61. declare priceMaxi: number | null
  62. @Attr(() => [])
  63. declare categories: Array<string> | null
  64. }