Files
car_info/app/model/VehicleEn.php
T
2025-05-09 16:04:16 +08:00

49 lines
918 B
PHP

<?php
namespace app\model;
use support\Model;
class VehicleEn extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'vehicles_en';
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
//批量赋值黑名单
protected $guarded = ['created_at', 'updated_at'];
/**
* Get the location that owns the vehicle.
*/
public function location()
{
return $this->belongsTo(LocationEn::class, 'locations_id', 'id');
}
/**
* Get the location that owns the vehicle.
*/
public function finalLocation()
{
return $this->belongsTo(LocationEn::class, 'final_locations_id', 'id');
}
}