krgm.so-manager-dev.com/app/Models/Park.php

45 lines
917 B
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;
/**
* 駐輪場モデル - parkテーブル正式モデル
* 旧UsingStatusParkの責務を置き換え
*/
class Park extends Model
{
protected $table = 'park';
protected $primaryKey = 'park_id';
public $timestamps = true;
public const CREATED_AT = 'created_at';
public const UPDATED_AT = 'updated_at';
protected $fillable = [
'park_name',
'park_ruby',
'park_syllabary',
'park_adrs',
'park_close_flag',
'park_day',
'alert_flag',
'print_number',
'keep_alive',
'city_id',
'operator_id',
];
/**
* 料金設定との関連付け
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function prices()
{
return $this->hasMany(PriceA::class, 'park_id', 'park_id');
}
}