77 lines
1.3 KiB
PHP
77 lines
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class Identification
|
|
*
|
|
* @property int $id
|
|
* @property string $firstname
|
|
* @property string $lastname
|
|
* @property Carbon $birth_date
|
|
* @property string $town
|
|
* @property int $country
|
|
* @property string $identity_document
|
|
* @property string $id_identity_document
|
|
* @property Carbon $validity_date_document
|
|
* @property int $idUser
|
|
* @property int $status
|
|
* @property Carbon $createdAt
|
|
* @property string $user_image
|
|
* @property string $document_image
|
|
*
|
|
* @property User $user
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class Identification extends Model
|
|
{
|
|
protected $table = 'identifications';
|
|
public $timestamps = false;
|
|
|
|
protected $casts = [
|
|
'country' => 'int',
|
|
'idUser' => 'int',
|
|
'status' => 'int'
|
|
];
|
|
|
|
protected $dates = [
|
|
'birth_date',
|
|
'validity_date_document',
|
|
'createdAt'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'firstname',
|
|
'lastname',
|
|
'birth_date',
|
|
'town',
|
|
'country',
|
|
'identity_document',
|
|
'id_identity_document',
|
|
'validity_date_document',
|
|
'idUser',
|
|
'status',
|
|
'createdAt',
|
|
'user_image',
|
|
'document_image'
|
|
];
|
|
|
|
public function country()
|
|
{
|
|
return $this->belongsTo(Country::class, 'country');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'idUser');
|
|
}
|
|
}
|