This repository has been archived on 2026-09-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
tutoring/app/Models/BillingAccount.php
2026-01-14 00:54:08 +00:00

41 lines
813 B
PHP

<?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');
}
}