62 lines
1.1 KiB
PHP
62 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace app\console\model;
|
|
|
|
use support\Model;
|
|
|
|
/**
|
|
* VehicleDataTranslationModel
|
|
*/
|
|
class VehicleDataTranslationModel 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_data_translation';
|
|
|
|
/**
|
|
* 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_id', 'locale', 'name', 'condition_desc'];
|
|
|
|
/**
|
|
* 不允许自动填充模型字段
|
|
*/
|
|
protected $guarded = [];
|
|
|
|
|
|
public function vehicle()
|
|
{
|
|
return $this->belongsTo(VehicleDataModel::class, 'vehicle_id');
|
|
}
|
|
} |