Initial commit
This commit is contained in:
commit
c909d539bc
7178 files changed
+756624
No files matched your search
@@ -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');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user