BookingProductEventTicketTranslation.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace Webkul\BagistoApi\Models;
  3. use ApiPlatform\Metadata\ApiProperty;
  4. use ApiPlatform\Metadata\ApiResource;
  5. use Illuminate\Database\Eloquent\Model;
  6. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  7. #[ApiResource(operations: [], graphQlOperations: [])]
  8. class BookingProductEventTicketTranslation extends Model
  9. {
  10. protected $table = 'booking_product_event_ticket_translations';
  11. public $timestamps = false;
  12. protected $fillable = ['name', 'description', 'locale', 'booking_product_event_ticket_id'];
  13. public function eventTicket(): BelongsTo
  14. {
  15. return $this->belongsTo(BookingProductEventTicket::class, 'booking_product_event_ticket_id');
  16. }
  17. #[ApiProperty(writable: false, readable: true, required: false)]
  18. public function getBookingProductEventTicketId()
  19. {
  20. return $this->booking_product_event_ticket_id;
  21. }
  22. #[ApiProperty(writable: false, readable: true, required: false)]
  23. public function getName()
  24. {
  25. return $this->name;
  26. }
  27. #[ApiProperty(writable: false, readable: true, required: false)]
  28. public function getDescription()
  29. {
  30. return $this->description;
  31. }
  32. #[ApiProperty(writable: false, readable: true, required: false)]
  33. public function getLocale()
  34. {
  35. return $this->locale;
  36. }
  37. }