88 lines
2.1 KiB
PHP
88 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace app\console\model;
|
|
|
|
use support\Model;
|
|
|
|
/**
|
|
* VehicleAlbumModel
|
|
*/
|
|
class DraftsAlbumModel extends Model
|
|
{
|
|
/**
|
|
* The connection name for the model.
|
|
*
|
|
* @var string|null
|
|
*/
|
|
protected $connection = 'mysql';
|
|
|
|
/**
|
|
* The table associated with the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'hs_drafts_album';
|
|
|
|
/**
|
|
* The primary key associated with the table.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $primaryKey = 'id';
|
|
|
|
/**
|
|
* Indicates if the model should be timestamped.
|
|
*
|
|
* @var bool
|
|
*/
|
|
public $timestamps = true;
|
|
|
|
/**
|
|
* 模型的数据字段的保存格式。
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $dateFormat = 'U';
|
|
|
|
/**
|
|
* 允许自动填充模型字段
|
|
*/
|
|
protected $fillable = ['id', 'drafts_data_id', 'front_45_degree', 'front_left_45_degree', 'front_left_headlight', 'front_view', 'lower_front', 'wheel_hub', 'front_right_seat', 'right_lower_side', 'rear_right_taillight', 'rear_right_45_degree', 'lower_rear', 'trunk', 'left_lower_side', 'rear_seats', 'center_console', 'control_panel', 'gear_shift', 'car_key', 'steering_wheel', 'dashboard', 'odometer_reading', 'front_left_door_panel', 'front_left_door_function_area', 'front_left_seat', 'interior_ceiling', 'created_at', 'updated_at'];
|
|
|
|
/**
|
|
* 不允许自动填充模型字段
|
|
*/
|
|
protected $guarded = [];
|
|
|
|
|
|
/**
|
|
* 相册字段
|
|
*/
|
|
const VEHICLE_ALBUM_FIELDS = [
|
|
'front_45_degree',
|
|
'front_left_45_degree',
|
|
'front_left_headlight',
|
|
'front_view',
|
|
'lower_front',
|
|
'wheel_hub',
|
|
'front_right_seat',
|
|
'right_lower_side',
|
|
'rear_right_taillight',
|
|
'rear_right_45_degree',
|
|
'lower_rear',
|
|
'trunk',
|
|
'left_lower_side',
|
|
'rear_seats',
|
|
'center_console',
|
|
'control_panel',
|
|
'gear_shift',
|
|
'car_key',
|
|
'steering_wheel',
|
|
'dashboard',
|
|
'odometer_reading',
|
|
'front_left_door_panel',
|
|
'front_left_door_function_area',
|
|
'front_left_seat',
|
|
'interior_ceiling'
|
|
];
|
|
} |