Initial commit

This commit is contained in:
Richard Jolley committed 2026-01-14 00:54:08 +00:00
commit c909d539bc
7178 files changed
+756624

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class BillingAccount extends Model
{
use SoftDeletes;
protected $fillable = [
'name',
'contact_name',
'primary_parent_user_id',
'invoice_email',
'phone',
'address_line1',
'address_line2',
'town',
'postcode',
'country',
];
/**
* The primary parent user linked to this billing account.
*/
public function primaryParent()
{
return $this->belongsTo(User::class, 'primary_parent_user_id');
}
/**
* Students billed under this account.
*/
public function students()
{
return $this->hasMany(StudentProfile::class, 'billing_account_id');
}
}