BlogMatch/app/Receiver.php

87 lines
1.7 KiB
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 Receiver
*
* @property string $RID
* @property string $password
* @property string $name
* @property string $nickName
* @property string $phone
* @property string $email
* @property string $address
* @property string $indroduction
* @property string $photoPath
* @property string $bankName
* @property string $bankID
* @property int $verifyStatus
* @property string $bankLocation
*
* @property \Illuminate\Database\Eloquent\Collection $belongs
* @property \Illuminate\Database\Eloquent\Collection $commissioneds
* @property \Illuminate\Database\Eloquent\Collection $manages
* @property \Illuminate\Database\Eloquent\Collection $preferences
*
* @package App
*/
class Receiver extends Eloquent
{
protected $connection = 'mysql';
protected $table = 'Receiver';
protected $primaryKey = 'RID';
public $incrementing = false;
public $timestamps = false;
protected $casts = [
'verifyStatus' => 'int'
];
protected $hidden = [
'password'
];
protected $fillable = [
'password',
'name',
'nickName',
'phone',
'email',
'address',
'indroduction',
'photoPath',
'bankName',
'bankID',
'verifyStatus',
'bankLocation'
];
public function belongs()
{
return $this->hasMany(\App\Belong::class, 'RID');
}
public function commissioneds()
{
return $this->hasMany(\App\Commissioned::class, 'RID');
}
public function manages()
{
return $this->hasMany(\App\Manage::class, 'RID');
}
public function preferences()
{
return $this->hasMany(\App\Preference::class, 'RID');
}
}