activity_model.php
3 months ago
agent_meta_model.php
3 months ago
agent_model.php
3 months ago
booking_meta_model.php
3 months ago
booking_model.php
1 day ago
bundle_meta_model.php
3 months ago
bundle_model.php
1 week ago
cart_item_model.php
3 months ago
cart_meta_model.php
3 months ago
cart_model.php
2 weeks ago
connector_model.php
3 months ago
customer_meta_model.php
3 months ago
customer_model.php
1 month ago
invoice_model.php
2 weeks ago
join_bundles_services_model.php
3 months ago
location_category_model.php
3 months ago
location_model.php
3 months ago
meta_model.php
3 months ago
model.php
3 days ago
off_period_model.php
3 months ago
order_intent_meta_model.php
3 months ago
order_intent_model.php
1 week ago
order_item_model.php
3 months ago
order_meta_model.php
3 months ago
order_model.php
1 month ago
otp_model.php
3 months ago
payment_request_model.php
3 months ago
process_job_model.php
3 months ago
process_model.php
1 month ago
recurrence_model.php
3 months ago
service_category_model.php
3 months ago
service_meta_model.php
3 months ago
service_model.php
3 months ago
session_model.php
3 months ago
settings_model.php
3 months ago
step_settings_model.php
3 months ago
transaction_intent_model.php
3 months ago
transaction_model.php
3 months ago
transaction_refund_model.php
3 months ago
work_period_model.php
3 months ago
recurrence_model.php
47 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( |
| 30 | 'id', |
| 31 | 'rules', |
| 32 | 'overrides', |
| 33 | ); |
| 34 | return $allowed_params; |
| 35 | } |
| 36 | |
| 37 | |
| 38 | protected function params_to_save( $role = 'admin' ) { |
| 39 | $params_to_save = array( |
| 40 | 'id', |
| 41 | 'rules', |
| 42 | 'overrides', |
| 43 | ); |
| 44 | return $params_to_save; |
| 45 | } |
| 46 | } |
| 47 |