更新遷移檔(migration)並新增自動產生的Model
This commit is contained in:
37
app/Area.php
Normal file
37
app/Area.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Sat, 28 Jul 2018 18:02:51 +0000.
|
||||
*/
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
/**
|
||||
* Class Area
|
||||
*
|
||||
* @property int $AID
|
||||
* @property string $name
|
||||
*
|
||||
* @property \Illuminate\Database\Eloquent\Collection $manages
|
||||
*
|
||||
* @package App
|
||||
*/
|
||||
class Area extends Eloquent
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
protected $table = 'Area';
|
||||
protected $primaryKey = 'AID';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
|
||||
public function manages()
|
||||
{
|
||||
return $this->hasMany(\App\Manage::class, 'AID');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user