Files
car_info/app/model/VehicleRu.php
T

49 lines
918 B
PHP
Raw Normal View History

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