forked from kol/BlogMatch
66 lines
1.2 KiB
PHP
66 lines
1.2 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
* Date: Sat, 28 Jul 2018 18:02:51 +0000.
|
|
*/
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model as Eloquent;
|
|
|
|
/**
|
|
* Class TheCase
|
|
*
|
|
* @property string $TCID
|
|
* @property string $CBID
|
|
* @property string $name
|
|
* @property string $class
|
|
* @property string $description
|
|
* @property int $specialPrice
|
|
* @property int $price
|
|
* @property string $howToBuy
|
|
* @property \Carbon\Carbon $releaseDate
|
|
*
|
|
* @property \App\CaseBuilder $case_builder
|
|
* @property \Illuminate\Database\Eloquent\Collection $commissioneds
|
|
*
|
|
* @package App
|
|
*/
|
|
class TheCase extends Eloquent
|
|
{
|
|
protected $connection = 'mysql';
|
|
protected $table = 'TheCase';
|
|
public $incrementing = false;
|
|
public $timestamps = false;
|
|
|
|
protected $casts = [
|
|
'specialPrice' => 'int',
|
|
'price' => 'int'
|
|
];
|
|
|
|
protected $dates = [
|
|
'releaseDate'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'class',
|
|
'description',
|
|
'specialPrice',
|
|
'price',
|
|
'howToBuy',
|
|
'releaseDate'
|
|
];
|
|
|
|
public function case_builder()
|
|
{
|
|
return $this->belongsTo(\App\CaseBuilder::class, 'CBID');
|
|
}
|
|
|
|
public function commissioneds()
|
|
{
|
|
return $this->hasMany(\App\Commissioned::class, 'TCID');
|
|
}
|
|
}
|