Fixed order email, added site url tests, add doctrine/dbal, add service::site()
This commit is contained in:
@@ -9,12 +9,12 @@ use App\Traits\NextKey;
|
||||
class Payment extends Model
|
||||
{
|
||||
use NextKey;
|
||||
const RECORD_ID = 'payment';
|
||||
public $incrementing = FALSE;
|
||||
|
||||
const CREATED_AT = 'date_orig';
|
||||
const UPDATED_AT = 'date_last';
|
||||
const RECORD_ID = 'payment';
|
||||
|
||||
public $incrementing = FALSE;
|
||||
protected $table = 'ab_payment';
|
||||
protected $dates = ['date_payment'];
|
||||
protected $dateFormat = 'U';
|
||||
|
@@ -11,15 +11,14 @@ use App\Traits\NextKey;
|
||||
class Product extends Model
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = 'product';
|
||||
public $incrementing = FALSE;
|
||||
|
||||
protected $table = 'ab_product';
|
||||
protected $with = ['descriptions'];
|
||||
|
||||
const CREATED_AT = 'date_orig';
|
||||
const UPDATED_AT = 'date_last';
|
||||
public $incrementing = FALSE;
|
||||
public $dateFormat = 'U';
|
||||
|
||||
public function descriptions()
|
||||
|
@@ -184,6 +184,17 @@ class Service extends Model
|
||||
return $this->belongsTo(Product::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* The site this service is configured for
|
||||
*
|
||||
* @todo It may be more appropriate to get this from the account->user attribute (ie: for mail actions)
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function site()
|
||||
{
|
||||
return $this->belongsTo(Site::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a child model with details of the service
|
||||
*
|
||||
|
Reference in New Issue
Block a user