⚝
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 :
ChargeCategory.php
<?php namespace App\Models; use App\Traits\PopulateTenantID; use Eloquent as Model; use Stancl\Tenancy\Database\Concerns\BelongsToTenant; /** * Class ChargeCategory * * @version April 11, 2020, 5:26 am UTC * * @property int $id * @property string $name * @property string $description * @property int $charge_type * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChargeCategory newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChargeCategory newQuery() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChargeCategory query() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChargeCategory whereChargeType($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChargeCategory whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChargeCategory whereDescription($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChargeCategory whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChargeCategory whereName($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ChargeCategory whereUpdatedAt($value) * * @mixin \Eloquent */ class ChargeCategory extends Model { use BelongsToTenant, PopulateTenantID; public $table = 'charge_categories'; const CHARGE_TYPES = [ 1 => 'Investigations', 2 => 'Operation Theatre', 3 => 'Others', 4 => 'Procedures', 5 => 'Supplier', ]; const FILTER_CHARGE_TYPES = [ 0 => 'All', 1 => 'Procedures', 2 => 'Investigations', 3 => 'Supplier', 4 => 'Operation Theatre', 5 => 'Others', ]; public $fillable = [ 'name', 'description', 'charge_type', ]; /** * Validation rules * * @var array */ public static $rules = [ 'name' => 'required|is_unique:charge_categories,name', 'description' => 'nullable', 'charge_type' => 'required', ]; /** * Get the attributes that should be cast. * * @return array<string, string> */ protected function casts(): array { return [ 'id' => 'integer', 'name' => 'string', ]; } }