Event.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. import { Str, Uid, Attr, Num } from 'pinia-orm/dist/decorators'
  2. import ApiModel from '~/models/ApiModel'
  3. import { Assert, IriEncoded } from '~/models/decorators'
  4. import File from '~/models/Core/File'
  5. import Place from '~/models/Place/Place'
  6. import Country from '~/models/Core/Country'
  7. import Category from '~/models/Core/Category'
  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. @IriEncoded(Category)
  64. declare categories: Array<string> | null
  65. }