fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
+17 -18
View File
@@ -3,6 +3,7 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use App\Models\BaseModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
@@ -29,11 +30,11 @@ class ReimbursementBatch extends BaseModel
];
protected $casts = [
'created_by' => 'integer',
'closed_by' => 'integer',
'created_by' => 'integer',
'closed_by' => 'integer',
'yearly_batch_number' => 'integer',
'opened_at' => 'datetime',
'closed_at' => 'datetime',
'opened_at' => 'datetime',
'closed_at' => 'datetime',
];
/* ============================================================
@@ -41,11 +42,9 @@ class ReimbursementBatch extends BaseModel
* ============================================================
*/
public const STATUS_OPEN = 'open';
public const STATUS_OPEN = 'open';
public const STATUS_CLOSED = 'closed';
public const STATUS_DRAFT = 'draft';
public const STATUS_DRAFT = 'draft';
public static function allowedStatuses(): array
{
@@ -156,16 +155,16 @@ class ReimbursementBatch extends BaseModel
public static function rules(?int $id = null): array
{
return [
'title' => ['required', 'string', 'max:255'],
'status' => ['required', 'string', 'in:'.implode(',', self::allowedStatuses())],
'created_by' => ['nullable', 'integer'],
'closed_by' => ['nullable', 'integer'],
'opened_at' => ['nullable', 'date'],
'closed_at' => ['nullable', 'date', 'after_or_equal:opened_at'],
'notes' => ['nullable', 'string', 'max:5000'],
'school_year' => ['nullable', 'string', 'max:20'],
'semester' => ['nullable', 'string', 'max:20'],
'title' => ['required', 'string', 'max:255'],
'status' => ['required', 'string', 'in:' . implode(',', self::allowedStatuses())],
'created_by' => ['nullable', 'integer'],
'closed_by' => ['nullable', 'integer'],
'opened_at' => ['nullable', 'date'],
'closed_at' => ['nullable', 'date', 'after_or_equal:opened_at'],
'notes' => ['nullable', 'string', 'max:5000'],
'school_year' => ['nullable', 'string', 'max:20'],
'semester' => ['nullable', 'string', 'max:20'],
'yearly_batch_number' => ['nullable', 'integer', 'min:1'],
];
}
}
}