更新遷移檔(migration)並新增自動產生的Model
This commit is contained in:
75
app/Manage.php
Normal file
75
app/Manage.php
Normal 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user