All checks were successful
Deploy preview (main_go) / deploy (push) Successful in 14s
- SHJ-9: 日次売上集計処理 - SHJ-10: 年次月次売上集計処理 - SHJ-6: サーバ死活監視処理 - 各種モデルサービスコマンド追加 - earnings_summary, device, hardware_check_log, print_job_log テーブル用SQL追加
63 lines
1.2 KiB
PHP
63 lines
1.2 KiB
PHP
<?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');
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|