add school year model
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class AuditLog extends BaseModel
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'audit_logs';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'action',
|
||||
'table_name',
|
||||
'record_id',
|
||||
'old_value',
|
||||
'new_value',
|
||||
'metadata',
|
||||
'created_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'integer',
|
||||
'record_id' => 'integer',
|
||||
'old_value' => 'array',
|
||||
'new_value' => 'array',
|
||||
'metadata' => 'array',
|
||||
'created_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class ParentAccount extends BaseModel
|
||||
{
|
||||
protected $table = 'parent_accounts';
|
||||
|
||||
protected $fillable = [
|
||||
'parent_id',
|
||||
'school_year',
|
||||
'opening_balance',
|
||||
'current_balance',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'parent_id' => 'integer',
|
||||
'opening_balance' => 'decimal:2',
|
||||
'current_balance' => 'decimal:2',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class ParentBalanceTransfer extends BaseModel
|
||||
{
|
||||
protected $table = 'parent_balance_transfers';
|
||||
|
||||
protected $fillable = [
|
||||
'parent_id',
|
||||
'from_school_year',
|
||||
'to_school_year',
|
||||
'amount',
|
||||
'status',
|
||||
'source_summary_json',
|
||||
'new_invoice_id',
|
||||
'created_by',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'parent_id' => 'integer',
|
||||
'amount' => 'decimal:2',
|
||||
'source_summary_json' => 'array',
|
||||
'new_invoice_id' => 'integer',
|
||||
'created_by' => 'integer',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class SchoolYear extends BaseModel
|
||||
{
|
||||
public const STATUS_DRAFT = 'draft';
|
||||
public const STATUS_ACTIVE = 'active';
|
||||
public const STATUS_CLOSED = 'closed';
|
||||
public const STATUS_ARCHIVED = 'archived';
|
||||
|
||||
protected $table = 'school_years';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'status',
|
||||
'is_current',
|
||||
'closed_at',
|
||||
'closed_by',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'start_date' => 'date',
|
||||
'end_date' => 'date',
|
||||
'is_current' => 'boolean',
|
||||
'closed_at' => 'datetime',
|
||||
'closed_by' => 'integer',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user