all feature

This commit is contained in:
antv
2026-06-29 11:55:33 +07:00
parent 08d13336cd
commit 8a77324f89
59 changed files with 5587 additions and 145 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class AddCard extends Model
{
use HasFactory;
protected $table = 'add_card';
protected $fillable = [
'buyer',
'num_card',
'seller',
'date',
];
}
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Administration extends Model
{
use HasFactory;
const MAX_SEND_CARD_PER_MONTH = 5;
protected $table = 'administration';
protected $fillable = [
'msnv',
'received',
'sender',
'sent',
'receiver',
'date',
];
}
+31 -24
View File
@@ -2,48 +2,55 @@
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Database\Factories\UserFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
/** @use HasFactory<UserFactory> */
use HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
const ROLE_MEMBER = 0;
const ROLE_ADMIN = 1;
const STATUS_INACTIVE = 0;
const STATUS_ACTIVE = 1;
const FLAG_SEND_DISABLED = 0;
const FLAG_SEND_ENABLED = 1;
const FIRST_LOGIN_FALSE = 0;
const FIRST_LOGIN_TRUE = 1;
protected $table = 'user';
protected $primaryKey = 'msnv';
public $incrementing = false;
protected $keyType = 'string';
protected $fillable = [
'name',
'email',
'password',
'msnv',
'mail',
'pass',
'role',
'status',
'card',
'flag_send',
'first_login',
];
/**
* The attributes that should be hidden for serialization.
*
* @var list<string>
*/
protected $hidden = [
'password',
'pass',
'remember_token',
];
/**
* Get the attributes that should be cast.
* Get the password for the user.
*
* @return array<string, string>
* @return string
*/
protected function casts(): array
public function getAuthPassword()
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
return $this->pass;
}
}