add projet

This commit is contained in:
root
2026-03-05 12:29:37 -05:00
parent 8d1eef8ba8
commit 23b7db1107
9109 changed files with 1106501 additions and 73 deletions
+49
View File
@@ -0,0 +1,49 @@
<?php
namespace App\Models;
use App\Models\BaseModel;
class InventoryItem extends BaseModel
{
protected $table = 'inventory_items';
protected $primaryKey = 'id';
protected $useSoftDeletes = false;
public $timestamps = true;
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
// IMPORTANT: include everything you ever update/insert
protected $fillable = [
'type',
'category_id',
'name',
'description',
'quantity',
'good_qty',
'needs_repair_qty',
'need_replace_qty',
'cannot_find_qty',
'unit',
'condition',
'isbn',
'edition',
'sku',
'notes',
'semester',
'school_year',
'updated_by',
'created_at',
'updated_at',
];
protected $validationRules = [
'type' => 'required|in_list[classroom,book,office,kitchen]',
'name' => 'required|min_length[2]',
'quantity' => 'permit_empty|integer',
'unit_price' => 'permit_empty|decimal',
'semester' => 'permit_empty|in_list[Spring,Fall]',
'school_year' => 'permit_empty|max_length[16]', // e.g. 2025-2026
];
}