feat: initial project setup with Laravel 12 and Filament v4

This commit is contained in:
SajjadMahmoody
2026-04-03 17:25:17 +03:30
parent eca5d74b36
commit 09ee1cb743
324 changed files with 78304 additions and 23 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
use WithoutModelEvents;
public function run(): void
{
$this->call([
UserSeeder::class,
DoctorSeeder::class,
PaymentTypeSeeder::class,
PatientIllnessSeeder::class,
TreatmentSeeder::class,
SurgeryCenterSeeder::class,
MedicationSeeder::class,
OsurgInitialSeeder::class,
]);
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Database\Seeders;
use App\Models\Doctor;
use Illuminate\Database\Seeder;
class DoctorSeeder extends Seeder
{
public function run(): void
{
$doctors = [
[
'first_name' => 'مسعود',
'last_name' => 'شایگان',
'speciality' => 'متخصص جراحی فک و صورت',
'license_id' => '126900',
],
];
foreach ($doctors as $doctor) {
Doctor::firstOrCreate(
['license_id' => $doctor['license_id']],
$doctor
);
}
}
}
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace Database\Seeders;
use App\Models\Medication;
use Illuminate\Database\Seeder;
class MedicationSeeder extends Seeder
{
public function run(): void
{
$medications = [
['name' => 'Cephalexin', 'dosage_form' => 'Cap', 'strength' => '500mg', 'quantity' => 20, 'timing' => 'q8h', 'notes' => '', 'is_default' => true, 'is_active' => true],
['name' => 'Brozyne Ultra', 'dosage_form' => 'Cap', 'strength' => '8mg', 'quantity' => 11, 'timing' => 'q12h', 'notes' => '', 'is_default' => true, 'is_active' => true],
['name' => 'Acetaminophen', 'dosage_form' => 'Tab', 'strength' => '#20', 'quantity' => null, 'timing' => '8h', 'notes' => '', 'is_default' => false, 'is_active' => true],
['name' => 'Cetirizin', 'dosage_form' => 'Tab', 'strength' => '#20', 'quantity' => null, 'timing' => '12h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'Serum', 'dosage_form' => 'Serum', 'strength' => 'N/S', 'quantity' => null, 'timing' => '11h', 'notes' => '', 'is_default' => false, 'is_active' => true],
['name' => 'Pedia', 'dosage_form' => 'Amp', 'strength' => '8mg', 'quantity' => null, 'timing' => '10h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'Phenyle Phrine', 'dosage_form' => 'Nasal Drop', 'strength' => '#1', 'quantity' => null, 'timing' => '8h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'Sodium Chloride', 'dosage_form' => 'Nasal Drop', 'strength' => '#1', 'quantity' => null, 'timing' => '8h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'آموکسی‌سیلین', 'dosage_form' => 'Cap', 'strength' => '500mg', 'quantity' => null, 'timing' => '8h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'متروندیازول', 'dosage_form' => 'Tab', 'strength' => '250mg', 'quantity' => null, 'timing' => '8h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'ایبوپروفن', 'dosage_form' => 'Tab', 'strength' => '400mg', 'quantity' => null, 'timing' => '8h', 'notes' => '', 'is_default' => false, 'is_active' => true],
['name' => 'دیکلوفناک', 'dosage_form' => 'Tab', 'strength' => '50mg', 'quantity' => null, 'timing' => '12h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'پردنیزولون', 'dosage_form' => 'Tab', 'strength' => '5mg', 'quantity' => null, 'timing' => '8&12h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'اومپرازول', 'dosage_form' => 'Cap', 'strength' => '20mg', 'quantity' => null, 'timing' => '24h', 'notes' => null, 'is_default' => false, 'is_active' => true],
['name' => 'ویتامین C', 'dosage_form' => 'Tab', 'strength' => '500mg', 'quantity' => null, 'timing' => '12h', 'notes' => null, 'is_default' => false, 'is_active' => true],
];
foreach ($medications as $item) {
Medication::firstOrCreate(
['name' => $item['name'], 'dosage_form' => $item['dosage_form']],
$item
);
}
}
}
+97
View File
@@ -0,0 +1,97 @@
<?php
namespace Database\Seeders;
use App\Models\OsurgInitial;
use Illuminate\Database\Seeder;
class OsurgInitialSeeder extends Seeder
{
public function run(): void
{
$initials = [
[
'init_parameter' => 'login_bg.png',
'init_value' => null,
'attachment' => 'initials/login_bg.png',
],
[
'init_parameter' => 'list_bg.png',
'init_value' => null,
'attachment' => 'initials/list_bg.png',
],
[
'init_parameter' => 'listlogo_per.png',
'init_value' => null,
'attachment' => 'initials/listlogo_per.png',
],
[
'init_parameter' => 'listlogo_eng.png',
'init_value' => null,
'attachment' => 'initials/listlogo_eng.png',
],
[
'init_parameter' => 'loginlogo_per.png',
'init_value' => null,
'attachment' => 'initials/loginlogo_per.png',
],
[
'init_parameter' => 'loginlogo_eng.png',
'init_value' => null,
'attachment' => 'initials/loginlogo_eng.png',
],
[
'init_parameter' => 'sync_peer_ip',
'init_value' => '192.168.1.XX',
'attachment' => null,
],
[
'init_parameter' => 'sync_peer_port',
'init_value' => '8000',
'attachment' => null,
],
[
'init_parameter' => 'sync_token',
'init_value' => 'change-this-to-a-secret-token',
'attachment' => null,
],
[
'init_parameter' => 'sms_api_url',
'init_value' => 'http://94.101.184.91/api/sms',
'attachment' => null,
],
[
'init_parameter' => 'sms_api_key',
'init_value' => 'surgery-sms-2024',
'attachment' => null,
],
[
'init_parameter' => 'ftp_user',
'init_value' => 'root',
'attachment' => null,
],
[
'init_parameter' => 'ftp_pass',
'init_value' => 'Mjoshanitcm7717',
'attachment' => null,
],
[
'init_parameter' => 'ftp_port',
'init_value' => '2121',
'attachment' => null,
],
[
'init_parameter' => 'ftp_remote_path',
'init_value' => 'C:/wamp64/www/matab-panel/storage/app/public',
'attachment' => null,
],
];
foreach ($initials as $item) {
OsurgInitial::firstOrCreate(
['init_parameter' => $item['init_parameter']],
$item
);
}
}
}
+39
View File
@@ -0,0 +1,39 @@
<?php
namespace Database\Seeders;
use App\Models\PatientIllness;
use Illuminate\Database\Seeder;
class PatientIllnessSeeder extends Seeder
{
public function run(): void
{
$illnesses = [
['illness' => 'بیماری کبدی یا هپاتیت', 'row_no' => 2, 'priority' => 4],
['illness' => 'اعتیاد به مواد مخدر', 'row_no' => 2, 'priority' => 3],
['illness' => 'سابقه سکته', 'row_no' => 2, 'priority' => 2],
['illness' => 'سابقه ضربه به فک و مفصل گیجگاهی فکی', 'row_no' => 2, 'priority' => 1],
['illness' => 'ضایعات مادرزادی قلبی', 'row_no' => 1, 'priority' => 8],
['illness' => 'رماتیسم قلبی یا ضایعات دریچه ای قلبی', 'row_no' => 1, 'priority' => 7],
['illness' => 'دیابت (قند خون)', 'row_no' => 1, 'priority' => 6],
['illness' => 'بیماری تنفسی یا آسم', 'row_no' => 1, 'priority' => 5],
['illness' => 'بیماری کلیوی', 'row_no' => 1, 'priority' => 4],
['illness' => 'بیماری عصبی یا صرع', 'row_no' => 1, 'priority' => 3],
['illness' => 'فشار خون بالا', 'row_no' => 1, 'priority' => 2],
['illness' => 'بیماری قلبی و عروقی', 'row_no' => 1, 'priority' => 1],
['illness' => 'ایدز', 'row_no' => 2, 'priority' => 8],
['illness' => 'سابقه عمل جراحی', 'row_no' => 2, 'priority' => 7],
['illness' => 'اختلالات خونریزی دهنده و هموفیلی', 'row_no' => 2, 'priority' => 6],
['illness' => 'بیماری غددی و تیروئید، پانکراس', 'row_no' => 2, 'priority' => 5],
['illness' => 'الرژی', 'row_no' => 1, 'priority' => 1],
];
foreach ($illnesses as $item) {
PatientIllness::firstOrCreate(
['illness' => $item['illness']],
$item
);
}
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace Database\Seeders;
use App\Models\PaymentType;
use Illuminate\Database\Seeder;
class PaymentTypeSeeder extends Seeder
{
public function run(): void
{
$paymentTypes = [
['payment_type' => 'بانک ملت', 'account_no' => '222', 'pos_no' => null, 'description' => null],
['payment_type' => 'بانک سامان', 'account_no' => '111', 'pos_no' => null, 'description' => null],
['payment_type' => 'پرداخت نقدی', 'account_no' => null, 'pos_no' => null, 'description' => null],
['payment_type' => 'بانک صادرات', 'account_no' => null, 'pos_no' => null, 'description' => null],
['payment_type' => 'کارت به کارت بانکی', 'account_no' => '123', 'pos_no' => '456', 'description' => null],
['payment_type' => 'نقد و کارت', 'account_no' => null, 'pos_no' => null, 'description' => null],
['payment_type' => 'توسعه عصر', 'account_no' => null, 'pos_no' => null, 'description' => null],
];
foreach ($paymentTypes as $item) {
PaymentType::firstOrCreate(
['payment_type' => $item['payment_type']],
$item
);
}
}
}
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace Database\Seeders;
use App\Models\SurgeryCenter;
use Illuminate\Database\Seeder;
class SurgeryCenterSeeder extends Seeder
{
public function run(): void
{
$centers = [
[
'name' => 'کلینیک پارس',
'address' => 'مازندران، ساری، میدان امام، مجتمع برلیان',
'phone' => '9122283482',
'email' => null,
'contact_person' => 'دکتر شایگان',
'description' => null,
],
];
foreach ($centers as $item) {
SurgeryCenter::firstOrCreate(
['name' => $item['name']],
$item
);
}
}
}
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace Database\Seeders;
use App\Models\Treatment;
use Illuminate\Database\Seeder;
class TreatmentSeeder extends Seeder
{
public function run(): void
{
$treatments = [
['treatment_type' => 'ویزیت', 'treatment_name' => 'دندان', 'descriptions' => null, 'treatment_cost' => 0],
['treatment_type' => 'ویزیت', 'treatment_name' => 'ویزیت', 'descriptions' => null, 'treatment_cost' => 300000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'بررسی وضعیت بیمار', 'descriptions' => null, 'treatment_cost' => 0],
['treatment_type' => 'ویزیت', 'treatment_name' => 'تزریق ژل', 'descriptions' => null, 'treatment_cost' => null],
['treatment_type' => 'ویزیت', 'treatment_name' => 'تزریق تریامیسنولون', 'descriptions' => null, 'treatment_cost' => null],
['treatment_type' => 'ویزیت', 'treatment_name' => 'خارج کردن اسپلینت ها و بخیه', 'descriptions' => null, 'treatment_cost' => 300000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'تعویض چسب', 'descriptions' => null, 'treatment_cost' => 150000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'مشاوره', 'descriptions' => null, 'treatment_cost' => 300000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'کشیدن تامپون', 'descriptions' => null, 'treatment_cost' => 300000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'ودیعه', 'descriptions' => null, 'treatment_cost' => 1000000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'بوتاکس', 'descriptions' => null, 'treatment_cost' => null],
['treatment_type' => 'ویزیت', 'treatment_name' => 'مزوتراپی', 'descriptions' => null, 'treatment_cost' => null],
['treatment_type' => 'ویزیت', 'treatment_name' => 'چک کردن', 'descriptions' => null, 'treatment_cost' => 150000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'جراحی سرپایی', 'descriptions' => null, 'treatment_cost' => null],
['treatment_type' => 'ویزیت', 'treatment_name' => 'چسب سفید', 'descriptions' => null, 'treatment_cost' => 200000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'چسب کرم', 'descriptions' => null, 'treatment_cost' => 250000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'کشیدن بخیه', 'descriptions' => null, 'treatment_cost' => 150000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'نوزونت تیوبی', 'descriptions' => null, 'treatment_cost' => 500000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'نوستریل ریتینر', 'descriptions' => null, 'treatment_cost' => 1500000],
['treatment_type' => 'ویزیت', 'treatment_name' => 'نوزونت مخروطی', 'descriptions' => null, 'treatment_cost' => 500000],
];
foreach ($treatments as $item) {
Treatment::firstOrCreate(
['treatment_name' => $item['treatment_name']],
$item
);
}
}
}
+53
View File
@@ -0,0 +1,53 @@
<?php
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class UserSeeder extends Seeder
{
public function run(): void
{
$users = [
[
'name' => 'مدیر برنامه',
'username' => 'admin',
'email' => null,
'password' => Hash::make('nn'),
],
[
'name' => 'مسعود شایگان',
'username' => 'shaygan',
'email' => null,
'password' => Hash::make('nn'),
],
[
'name' => 'امامی',
'username' => '09120861101',
'email' => null,
'password' => Hash::make('09120861101'),
],
[
'name' => 'رمضانی',
'username' => '09365233699',
'email' => null,
'password' => Hash::make('09365233699'),
],
[
'name' => 'رضایی',
'username' => '09118989216',
'email' => null,
'password' => Hash::make('09118989216'),
],
];
foreach ($users as $data) {
User::updateOrCreate(
['username' => $data['username']],
$data
);
}
}
}