krgm.so-manager-dev.com/app/Models/Zone.php
kin.rinzen 0498760d46
All checks were successful
Deploy main / deploy (push) Successful in 22s
画面修正
2025-10-28 13:58:45 +09:00

61 lines
1.1 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Zone extends Model
{
use HasFactory;
/**
* テーブル名
*/
protected $table = 'zone';
/**
* 主キー
*/
protected $primaryKey = 'zone_id';
/**
* タイムスタンプを有効化
*/
public $timestamps = true;
/**
* 一括代入可能なカラム
*/
protected $fillable = [
'park_id',
'park_name',
'ptype_id',
'psection_id',
'zone_name',
'zone_number',
'zone_standard',
'zone_tolerance',
'zone_sort',
'delete_flag',
'ope_id',
'created_at',
'updated_at',
];
public function park()
{
return $this->belongsTo(Park::class, 'park_id', 'park_id');
}
public function ptype()
{
return $this->belongsTo(Ptype::class, 'ptype_id', 'ptype_id');
}
public function psection()
{
return $this->belongsTo(Psection::class, 'psection_id', 'psection_id');
}
}