更新遷移檔(migration)並新增自動產生的Model
This commit is contained in:
89
app/CaseBuilder.php
Normal file
89
app/CaseBuilder.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
* Date: Sat, 28 Jul 2018 18:02:51 +0000.
|
||||
*/
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
/**
|
||||
* Class CaseBuilder
|
||||
*
|
||||
* @property string $CBID
|
||||
* @property string $password
|
||||
* @property string $companyName
|
||||
* @property string $companyPhone
|
||||
* @property string $companyAddress
|
||||
* @property string $uniformNumber
|
||||
* @property string $contact
|
||||
* @property string $contactNumber
|
||||
* @property string $contactEmail
|
||||
* @property string $isProxy
|
||||
* @property string $frequency
|
||||
* @property string $payment
|
||||
* @property \Carbon\Carbon $startServiceDate
|
||||
* @property \Carbon\Carbon $endServiceDate
|
||||
* @property int $verifyStatus
|
||||
*
|
||||
* @property \Illuminate\Database\Eloquent\Collection $be_classified_as
|
||||
* @property \Illuminate\Database\Eloquent\Collection $preferences
|
||||
* @property \Illuminate\Database\Eloquent\Collection $the_cases
|
||||
*
|
||||
* @package App
|
||||
*/
|
||||
class CaseBuilder extends Eloquent
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
protected $table = 'CaseBuilder';
|
||||
protected $primaryKey = 'CBID';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'verifyStatus' => 'int'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'startServiceDate',
|
||||
'endServiceDate'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'password'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'password',
|
||||
'companyName',
|
||||
'companyPhone',
|
||||
'companyAddress',
|
||||
'uniformNumber',
|
||||
'contact',
|
||||
'contactNumber',
|
||||
'contactEmail',
|
||||
'isProxy',
|
||||
'frequency',
|
||||
'payment',
|
||||
'startServiceDate',
|
||||
'endServiceDate',
|
||||
'verifyStatus'
|
||||
];
|
||||
|
||||
public function be_classified_as()
|
||||
{
|
||||
return $this->hasMany(\App\BeClassifiedA::class, 'CBID');
|
||||
}
|
||||
|
||||
public function preferences()
|
||||
{
|
||||
return $this->hasMany(\App\Preference::class, 'CBID');
|
||||
}
|
||||
|
||||
public function the_cases()
|
||||
{
|
||||
return $this->hasMany(\App\TheCase::class, 'CBID');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user