forked from kol/BlogMatch
44 lines
782 B
PHP
44 lines
782 B
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 TheClass
|
|
*
|
|
* @property int $CID
|
|
* @property string $name
|
|
*
|
|
* @property \Illuminate\Database\Eloquent\Collection $be_classified_as
|
|
* @property \Illuminate\Database\Eloquent\Collection $belongs
|
|
*
|
|
* @package App
|
|
*/
|
|
class TheClass extends Eloquent
|
|
{
|
|
protected $connection = 'mysql';
|
|
protected $table = 'TheClass';
|
|
protected $primaryKey = 'CID';
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'name'
|
|
];
|
|
|
|
public function be_classified_as()
|
|
{
|
|
return $this->hasMany(\App\BeClassifiedA::class, 'CID');
|
|
}
|
|
|
|
public function belongs()
|
|
{
|
|
return $this->hasMany(\App\Belong::class, 'CID');
|
|
}
|
|
}
|