car/application/admin/model/Cars.php
2025-06-25 18:20:34 +08:00

55 lines
739 B
PHP

<?php
namespace app\admin\model;
use think\Model;
class Cars extends Model
{
// 表名
protected $table = 'cars';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
public function contact()
{
return $this->belongsTo(Admin::class,'contact_id');
}
public function brand()
{
return $this->belongsTo(Brands::class,'brand_id');
}
public function series()
{
return $this->belongsTo(Series::class,'series_id');
}
}