activity_model.php
1 year ago
agent_meta_model.php
1 year ago
agent_model.php
1 year ago
booking_meta_model.php
1 year ago
booking_model.php
1 year ago
bundle_meta_model.php
1 year ago
bundle_model.php
1 year ago
cart_item_model.php
1 year ago
cart_meta_model.php
1 year ago
cart_model.php
1 year ago
connector_model.php
1 year ago
customer_meta_model.php
1 year ago
customer_model.php
9 months ago
invoice_model.php
1 year ago
join_bundles_services_model.php
1 year ago
location_category_model.php
1 year ago
location_model.php
1 year ago
meta_model.php
1 year ago
model.php
9 months ago
off_period_model.php
1 year ago
order_intent_meta_model.php
1 year ago
order_intent_model.php
9 months ago
order_item_model.php
1 year ago
order_meta_model.php
1 year ago
order_model.php
1 year ago
otp_model.php
9 months ago
payment_request_model.php
1 year ago
process_job_model.php
1 year ago
process_model.php
1 year ago
recurrence_model.php
1 year ago
service_category_model.php
9 months ago
service_meta_model.php
1 year ago
service_model.php
9 months ago
session_model.php
1 year ago
settings_model.php
1 year ago
step_settings_model.php
1 year ago
transaction_intent_model.php
1 year ago
transaction_model.php
1 year ago
transaction_refund_model.php
1 year ago
work_period_model.php
1 year ago
recurrence_model.php
44 lines
| 1 | <?php |
| 2 | |
| 3 | class OsRecurrenceModel extends OsModel{ |
| 4 | public $id, |
| 5 | $rules, |
| 6 | $overrides, |
| 7 | $updated_at, |
| 8 | $created_at; |
| 9 | |
| 10 | function __construct($id = false){ |
| 11 | parent::__construct(); |
| 12 | $this->table_name = LATEPOINT_TABLE_RECURRENCES; |
| 13 | $this->nice_names = []; |
| 14 | |
| 15 | if($id){ |
| 16 | $this->load_by_id($id); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | public function get_rules() { |
| 21 | return json_decode( $this->rules, true ); |
| 22 | } |
| 23 | |
| 24 | public function get_overrides() { |
| 25 | return json_decode( $this->overrides, true ); |
| 26 | } |
| 27 | |
| 28 | protected function allowed_params($role = 'admin'){ |
| 29 | $allowed_params = array('id', |
| 30 | 'rules', |
| 31 | 'overrides'); |
| 32 | return $allowed_params; |
| 33 | } |
| 34 | |
| 35 | |
| 36 | protected function params_to_save($role = 'admin'){ |
| 37 | $params_to_save = array('id', |
| 38 | 'rules', |
| 39 | 'overrides'); |
| 40 | return $params_to_save; |
| 41 | } |
| 42 | |
| 43 | |
| 44 | } |