first commit
This commit is contained in:
18
dashboard/app/Models/ActivityLog.php
Normal file
18
dashboard/app/Models/ActivityLog.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ActivityLog extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'action',
|
||||
'description',
|
||||
'ip_address',
|
||||
'user_agent',
|
||||
];
|
||||
|
||||
public $timestamps = false;
|
||||
}
|
||||
19
dashboard/app/Models/CaseLabResult.php
Normal file
19
dashboard/app/Models/CaseLabResult.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CaseLabResult extends Model
|
||||
{
|
||||
protected $table = 'case_lab_results';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'lab_code',
|
||||
'is_positive',
|
||||
'pathogen_name',
|
||||
'subtype',
|
||||
'indicator'
|
||||
];
|
||||
}
|
||||
16
dashboard/app/Models/LastSyncedLog.php
Normal file
16
dashboard/app/Models/LastSyncedLog.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class LastSyncedLog extends Model
|
||||
{
|
||||
protected $table = 'last_synced_logs';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'surveillance_id',
|
||||
'last_synced_date'
|
||||
];
|
||||
}
|
||||
24
dashboard/app/Models/Surveillance.php
Normal file
24
dashboard/app/Models/Surveillance.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Surveillance extends Model
|
||||
{
|
||||
protected $table = 'surveillances';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'code',
|
||||
'name_en',
|
||||
'name_kh',
|
||||
'start_date',
|
||||
'end_date'
|
||||
];
|
||||
|
||||
public function cases()
|
||||
{
|
||||
return $this->hasMany(SurveillanceCase::class, 'surveillance_id');
|
||||
}
|
||||
}
|
||||
31
dashboard/app/Models/SurveillanceCase.php
Normal file
31
dashboard/app/Models/SurveillanceCase.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SurveillanceCase extends Model
|
||||
{
|
||||
protected $table = 'surveillance_cases';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'lab_code',
|
||||
'case_date',
|
||||
'is_newcase',
|
||||
'sentinel_site_name',
|
||||
'site_province_name',
|
||||
'surveillance_id',
|
||||
'year_data',
|
||||
'week_data',
|
||||
'patient_age_inday',
|
||||
'patient_sex',
|
||||
'is_alive',
|
||||
'patient_privince'
|
||||
];
|
||||
|
||||
public function surveillance()
|
||||
{
|
||||
return $this->belongsTo(Surveillance::class, 'surveillance_id');
|
||||
}
|
||||
}
|
||||
48
dashboard/app/Models/User.php
Normal file
48
dashboard/app/Models/User.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasFactory, Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for serialization.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user