so-manager-dev.com/app/Models/PriceA.php
2025-09-19 19:01:21 +09:00

63 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* 料金・容量モデル - price_aテーブル正式モデル
* 旧UsingStatusPriceの責務を置き換え
*/
class PriceA extends Model
{
protected $table = 'price_a';
protected $primaryKey = 'price_parkplaceid';
public $timestamps = true;
public const CREATED_AT = 'created_at';
public const UPDATED_AT = 'updated_at';
protected $fillable = [
'prine_name',
'price_month',
'park_id',
'psection_id',
'price_ptypeid',
'user_categoryid',
'pplace_id',
'park_number',
'park_standard',
'park_limit',
'price',
'operator_id',
];
/**
* 駐輪場
*/
public function park()
{
return $this->belongsTo(Park::class, 'park_id', 'park_id');
}
/**
* 車種分類
*/
public function ptype()
{
return $this->belongsTo(Ptype::class, 'price_ptypeid', 'ptype_id');
}
/**
* 定期契約
*/
public function contracts()
{
return $this->hasMany(RegularContract::class, 'price_parkplaceid', 'price_parkplaceid');
}
}