mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 04:23:59 +00:00
big commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Traits\Timestamp;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\hasMany;
|
||||
|
||||
/**
|
||||
* Class Document
|
||||
* @package App\Models
|
||||
* @version August 4, 2020, 4:36 am
|
||||
*
|
||||
* @property int owner_id
|
||||
* @property int owner_type
|
||||
* @property int document_type
|
||||
* @property string reference
|
||||
* @property int status
|
||||
* @property \App\Models\User approved_by
|
||||
* @property timestamp issued_date
|
||||
* @property timestamp expired_date
|
||||
* @property timestamp approved_date
|
||||
*/
|
||||
class Document extends AbstractModel
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'documents';
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
|
||||
*/
|
||||
public function owner(): morphTo
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return hasMany
|
||||
*/
|
||||
public function files(): hasMany
|
||||
{
|
||||
return $this->hasMany(File::class, 'document_id');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user