更新遷移檔(migration)並新增自動產生的Model

This commit is contained in:
2018-07-29 02:23:20 +08:00
parent d7f4fc67db
commit f4158b8661
51 changed files with 1485 additions and 233 deletions

75
app/Manage.php Normal file
View File

@@ -0,0 +1,75 @@
<?php
/**
* Created by Reliese Model.
* Date: Sat, 28 Jul 2018 18:02:51 +0000.
*/
namespace App;
use Illuminate\Database\Eloquent\Model as Eloquent;
/**
* Class Manage
*
* @property string $RID
* @property int $AID
* @property string $URL
* @property \Carbon\Carbon $createdDate
* @property int $amountOfFans
* @property int $avgNumOfVisitorsPerDay
* @property int $numOfEntriesPerPage
* @property int $startOfCooperationFee
* @property int $endOfCooperationFee
* @property \Carbon\Carbon $startOfexecutionTime
* @property \Carbon\Carbon $endOfexecutionTime
*
* @property \App\Receiver $receiver
* @property \App\Area $area
*
* @package App
*/
class Manage extends Eloquent
{
protected $connection = 'mysql';
protected $table = 'Manage';
public $incrementing = false;
public $timestamps = false;
protected $casts = [
'AID' => 'int',
'amountOfFans' => 'int',
'avgNumOfVisitorsPerDay' => 'int',
'numOfEntriesPerPage' => 'int',
'startOfCooperationFee' => 'int',
'endOfCooperationFee' => 'int'
];
protected $dates = [
'createdDate',
'startOfexecutionTime',
'endOfexecutionTime'
];
protected $fillable = [
'URL',
'createdDate',
'amountOfFans',
'avgNumOfVisitorsPerDay',
'numOfEntriesPerPage',
'startOfCooperationFee',
'endOfCooperationFee',
'startOfexecutionTime',
'endOfexecutionTime'
];
public function receiver()
{
return $this->belongsTo(\App\Receiver::class, 'RID');
}
public function area()
{
return $this->belongsTo(\App\Area::class, 'AID');
}
}