Add Lab and Blood Bank manager roles with admin UIs.
Deploy Ladill Care / deploy (push) Successful in 46s
Deploy Ladill Care / deploy (push) Successful in 46s
Give lab_manager catalog/ops admin access and blood_bank_manager a branch-level stock register plus specialty admin surface, while keeping technicians on clinical queues. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('care_blood_bank_stock', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('owner_ref')->index();
|
||||
$table->foreignId('organization_id')->constrained('care_organizations')->cascadeOnDelete();
|
||||
$table->foreignId('branch_id')->nullable()->constrained('care_branches')->nullOnDelete();
|
||||
$table->string('product_code', 64);
|
||||
$table->string('product_label');
|
||||
$table->unsignedInteger('units_on_hand')->default(0);
|
||||
$table->unsignedInteger('reorder_level')->default(2);
|
||||
$table->text('notes')->nullable();
|
||||
$table->string('updated_by')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(
|
||||
['organization_id', 'branch_id', 'product_code'],
|
||||
'care_bb_stock_org_branch_product_unique',
|
||||
);
|
||||
$table->index(['organization_id', 'branch_id']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('care_blood_bank_stock');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user