Files
spacestation/common/models/receiver/order/Receiver_orders_model.php
T
2024-06-05 18:51:25 +08:00

39 lines
955 B
PHP

<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Receiver_orders_model extends HD_Model
{
private $table_name = 'lc_receiver_orders';
private $status_arr = [0 => '签约下定', 1 => '发票开具', 2 => '车辆交付', 3 => '已完成'];
public function __construct()
{
parent::__construct($this->table_name, 'default');
}
/**
* Notes:订单状态
* @return array
*/
public function get_status($status = '')
{
if (strlen($status)) {
$return_status = $this->status_arr[$status];
} else {
$return_status = $this->status_arr;
}
return $return_status;
}
public function downpayment_type($type = 0)
{
$array = [1 => '现金', 2 => '0首付', 3 => '按揭'];
if ($type) {
return $array[$type] ? $array[$type] : '';
} else {
return $array;
}
}
}