Files
useds/app/common/model/UsedCarFaq.php
T
2026-03-09 17:46:17 +08:00

59 lines
1.0 KiB
PHP

<?php
namespace app\common\model;
use support\Model;
class UsedCarFaq extends Model
{
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'mysql';
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'used_car_faq';
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = true;
protected $dateFormat = 'U';
/**
* 允许自动填充模型字段
*/
protected $fillable = [
'id', 'car_id', 'question', 'answer', 'sort', 'status', 'created_at', 'updated_at'
];
/**
* 不允许自动填充模型字段
*/
protected $guarded = [];
/**
* 关联车辆详情
*/
public function car()
{
return $this->belongsTo(UsedCarDetail::class, 'car_id', 'id');
}
}