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_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
1 year 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
1 year ago
order_intent_meta_model.php
1 year ago
order_intent_model.php
1 year ago
order_item_model.php
1 year ago
order_meta_model.php
1 year ago
order_model.php
1 year ago
payment_request_model.php
1 year ago
process_job_model.php
1 year ago
process_model.php
1 year ago
service_category_model.php
1 year ago
service_meta_model.php
1 year ago
service_model.php
1 year 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
connector_model.php
57 lines
| 1 | <?php |
| 2 | |
| 3 | class OsConnectorModel extends OsModel{ |
| 4 | public $id, |
| 5 | $agent_id, |
| 6 | $service_id, |
| 7 | $location_id, |
| 8 | $is_custom_price = false, |
| 9 | $is_custom_hours = false, |
| 10 | $is_custom_duration = false, |
| 11 | $updated_at, |
| 12 | $created_at; |
| 13 | |
| 14 | function __construct($id = false){ |
| 15 | parent::__construct(); |
| 16 | $this->table_name = LATEPOINT_TABLE_AGENTS_SERVICES; |
| 17 | $this->nice_names = array(); |
| 18 | |
| 19 | if($id){ |
| 20 | $this->load_by_id($id); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | |
| 25 | |
| 26 | protected function params_to_save($role = 'admin'){ |
| 27 | $params_to_save = array('id', |
| 28 | 'agent_id', |
| 29 | 'service_id', |
| 30 | 'location_id', |
| 31 | 'is_custom_price', |
| 32 | 'is_custom_hours', |
| 33 | 'is_custom_duration'); |
| 34 | return $params_to_save; |
| 35 | } |
| 36 | |
| 37 | protected function allowed_params($role = 'admin'){ |
| 38 | $allowed_params = array('id', |
| 39 | 'agent_id', |
| 40 | 'service_id', |
| 41 | 'location_id', |
| 42 | 'is_custom_price', |
| 43 | 'is_custom_hours', |
| 44 | 'is_custom_duration'); |
| 45 | return $allowed_params; |
| 46 | } |
| 47 | |
| 48 | |
| 49 | protected function properties_to_validate(){ |
| 50 | $validations = array( |
| 51 | 'agent_id' => array('presence'), |
| 52 | 'service_id' => array('presence'), |
| 53 | 'location_id' => array('presence'), |
| 54 | ); |
| 55 | return $validations; |
| 56 | } |
| 57 | } |