init
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
/**
|
||||
* Class User
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $first_name
|
||||
* @property string $last_name
|
||||
* @property string $national_code
|
||||
* @property bool $gender
|
||||
* @property int $marital_status
|
||||
* @property string|null $spouse_name
|
||||
* @property int $file_id
|
||||
* @property string $mobile
|
||||
* @property string $email
|
||||
* @property string $user_name
|
||||
* @property string $password
|
||||
* @property string $user_province
|
||||
* @property string $user_city
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
* @property string|null $deleted_at
|
||||
*
|
||||
* @property File $file
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class User extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $table = 'users';
|
||||
|
||||
protected $casts = [
|
||||
'gender' => 'bool',
|
||||
'marital_status' => 'int',
|
||||
'file_id' => 'int'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'password'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'first_name',
|
||||
'last_name',
|
||||
'national_code',
|
||||
'gender',
|
||||
'marital_status',
|
||||
'spouse_name',
|
||||
'file_id',
|
||||
'mobile',
|
||||
'email',
|
||||
'user_name',
|
||||
'password',
|
||||
'user_province',
|
||||
'user_city'
|
||||
];
|
||||
|
||||
public function file()
|
||||
{
|
||||
return $this->belongsTo(File::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user