⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
hospital.dev-unit.com
/
app
/
Models
/
View File Name :
PathologyTest.php
<?php namespace App\Models; use App\Traits\PopulateTenantID; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Support\Carbon; use Stancl\Tenancy\Database\Concerns\BelongsToTenant; /** * Class PathologyTest * * @version April 14, 2020, 9:33 am UTC * * @property string test_name * @property string short_name * @property string test_type * @property int category_id * @property int unit * @property string subcategory * @property string method * @property int report_days * @property int charge_category_id * @property float standard_charge * @property int $id * @property Carbon|null $created_at * @property Carbon|null $updated_at * @property-read \App\Models\ChargeCategory $chargecategory * @property-read \App\Models\RadiologyCategory $radiologycategory * * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest newQuery() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest query() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereCategoryId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereChargeCategoryId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereMethod($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereReportDays($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereShortName($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereStandardCharge($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereSubcategory($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereTestName($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereTestType($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereUnit($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PathologyTest whereUpdatedAt($value) * * @mixin \Eloquent * * @property string $test_name * @property string $short_name * @property string $test_type * @property int $category_id * @property int|null $unit * @property string|null $subcategory * @property string|null $method * @property int|null $report_days * @property int $charge_category_id * @property int $standard_charge * @property-read \App\Models\PathologyCategory $pathologycategory */ class PathologyTest extends Model { use BelongsToTenant, PopulateTenantID; public $table = 'pathology_tests'; public $fillable = [ 'test_name', 'short_name', 'test_type', 'category_id', 'unit', 'subcategory', 'method', 'report_days', 'charge_category_id', 'standard_charge', 'patient_id', ]; /** * Validation rules * * @var array */ public static $rules = [ 'test_name' => 'required|is_unique:pathology_tests,test_name', 'short_name' => 'required', 'test_type' => 'required', 'category_id' => 'required', 'charge_category_id' => 'required', 'standard_charge' => 'required', 'patient_id' => 'required', ]; /** * Get the attributes that should be cast. * * @return array<string, string> */ protected function casts(): array { return [ 'id' => 'integer', 'test_name' => 'string', 'short_name' => 'string', 'test_type' => 'string', 'category_id' => 'integer', 'unit' => 'integer', 'subcategory' => 'string', 'method' => 'string', 'report_days' => 'integer', 'charge_category_id' => 'integer', 'standard_charge' => 'double', 'patient_id' => 'integer', ]; } public function pathologycategory(): BelongsTo { return $this->belongsTo(PathologyCategory::class, 'category_id'); } public function chargecategory(): BelongsTo { return $this->belongsTo(ChargeCategory::class, 'charge_category_id'); } public function parameterItems(): HasMany { return $this->hasMany(PathologyParameterItem::class, 'pathology_id'); } public function patient(): BelongsTo { return $this->belongsTo(Patient::class, 'patient_id'); } }