| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
-
- namespace App\LatestModel\Module;
-
- use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
- use Jenssegers\Mongodb\Eloquent\SoftDeletes;
-
- class Form extends Eloquent {
- //
- use SoftDeletes;
-
- protected $connection = 'mongodb';
- protected $collection = 'form_submitted';
-
- // protected $guarded = ['_id'];
- protected $fillable = ['_id','type_service','type_application','status_payment','status_email','remark_form','created_at'];
-
- public function staff() {
- return $this->belongsTo('App\LatestModel\Staff','_id','dealer_id');
- }
-
- public function subscriber() {
- return $this->hasOne('App\LatestModel\Module\Subscriber','_id','_id');
- }
-
- public function subscribetrashed() {
- return $this->hasOne('App\LatestModel\Module\Subscriber','_id','_id')->onlyTrashed();
- }
-
- public function packagedetail(){
- return $this->hasOne('App\LatestModel\Module\PackageDetail','_id','_id');
- }
-
- public function packagedetailtrashed(){
- return $this->hasOne('App\LatestModel\Module\PackageDetail','_id','_id')->onlyTrashed();
- }
-
- public function workorder(){
- return $this->hasOne('App\LatestModel\Module\WorkOrder','_id','_id');
- }
-
- public function workordertrashed(){
- return $this->hasOne('App\LatestModel\Module\WorkOrder','_id','_id')->onlyTrashed();
- }
-
- public function formstatus(){
- return $this->hasMany('App\LatestModel\Module\FormStatus','form_id','_id');
- }
-
- public function company(){
- return $this->belongsTo('App\LatestModel\Module\Company','company_id','_id')->withTrashed();
- }
- }
|