Event.ts 1.7 KB

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