更新遷移檔(migration)並新增自動產生的Model
This commit is contained in:
55
app/PriceNegotiation.php
Normal file
55
app/PriceNegotiation.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Sat, 28 Jul 2018 18:02:51 +0000.
|
||||
*/
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
/**
|
||||
* Class PriceNegotiation
|
||||
*
|
||||
* @property string $ID
|
||||
* @property \Carbon\Carbon $negotiationDate
|
||||
* @property string $negotiator
|
||||
* @property string $itemName
|
||||
* @property int $itemValue
|
||||
* @property int $price
|
||||
* @property string $description
|
||||
*
|
||||
* @property \App\Commissioned $commissioned
|
||||
*
|
||||
* @package App
|
||||
*/
|
||||
class PriceNegotiation extends Eloquent
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
protected $table = 'PriceNegotiation';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'itemValue' => 'int',
|
||||
'price' => 'int'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'negotiationDate'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'negotiator',
|
||||
'itemName',
|
||||
'itemValue',
|
||||
'price',
|
||||
'description'
|
||||
];
|
||||
|
||||
public function commissioned()
|
||||
{
|
||||
return $this->belongsTo(\App\Commissioned::class, 'ID');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user