Initial commit
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
namespace app\console\model;
|
||||
|
||||
use support\Model;
|
||||
|
||||
/**
|
||||
* VehicleAlbumModel
|
||||
*/
|
||||
class VehicleAlbumModel 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_vehicle_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', 'vehicle_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'
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user