modified assests

This commit is contained in:
2026-06-15 11:25:16 +07:00
parent 3f115866d9
commit e96d58dcb4
1218 changed files with 1162 additions and 339502 deletions

View File

@@ -0,0 +1,47 @@
<?php
namespace App\Models;
use App\Enums\RecordStatusEnum;
use App\Models\Traits\HasLocalizedName;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Support\Facades\Session;
use App\Traits\AuditLogTrait;
class Organization extends BaseModel
{
public $timestamps = false;
use HasFactory;
use HasLocalizedName;
use AuditLogTrait;
/**
* The table associated with the model.
*
* @var string
*/
protected $appends = ['name'];
protected $primaryKey = 'id';
protected $fillable = [
'code', 'name_en','name_kh', 'latitude', 'longtitude', 'registered_at', 'village_id',
BaseModel::CREATED_BY_FIELD, BaseModel::UPDATED_AT_FIELD, BaseModel::UPDATED_BY_FIELD,
BaseModel::DELETED_AT_FIELD, BaseModel::DELETED_BY_FIELD, BaseModel::RECORD_STATUS_FIELD
];
public static function boot()
{
parent::boot();
}
// public function userLabCovers(){
// return $this->hasMany('App\Models\UserOrganization', 'organization_id','id')->where('record_status_id', RecordStatusEnum::ACTIVE);
// }
//
// public function labUsers(){
// return $this->hasMany('App\Models\UserOrganization', 'organization_id','id')->where('record_status_id', RecordStatusEnum::ACTIVE)->where('organization_id', Session::get('base_organization_id'));
// }
}