Guest User

Untitled

a guest
May 26th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. ## Booking
  2.  
  3. <?php
  4.  
  5. class Booking extends DataObject {
  6.  
  7. static $db = array(
  8. 'Status' => "Enum(array('Pending', 'Completed', 'Cancelled', 'Reserved', 'Refunded'))",
  9. 'Type' => "Enum(array('reserved', 'evoucher', 'direct', 'group', 'agent'))",
  10. 'TotalCost' => 'Currency',
  11. 'Reference' => 'Text',
  12. 'IP' => 'Text',
  13. 'Occasion' => "Enum(array('Advert', 'Gift Company', 'Email', 'Internet', 'Recommendation', 'Other'))",
  14. 'Recipient' => "Enum(array('Birthday', 'Corporate', 'Gift', 'Excursion', 'Other'))",
  15. 'HearAbout' => "Enum(array('Family', 'Friend', 'Work', 'Other'))",
  16. 'Notes' => 'Text',
  17. );
  18.  
  19. static $has_one = array(
  20. 'Payments' => 'Payment',
  21. 'Schedules' => 'Schedule',
  22. 'Activities' => 'Activity',
  23. 'Locations' => 'Location',
  24. );
  25. }
  26. ?>
  27.  
  28. ## Schedule
  29.  
  30. <?php
  31.  
  32. class Schedule extends DataObject {
  33.  
  34. static $db = array(
  35. 'Date' => 'Date',
  36. 'Time' => 'Time',
  37. 'Slots' => 'Int',
  38. 'Quota' => 'Int',
  39. );
  40.  
  41. static $has_many = array(
  42. 'Locations' => 'Location',
  43. 'Activities' => 'Activity',
  44. 'Bookings' => 'Booking'
  45. );
  46. }
  47. ?>
Add Comment
Please, Sign In to add comment