Berkarar/plugins/tps/shops/models/ReportDetail.php

46 lines
859 B
PHP
Raw Normal View History

2022-09-15 19:49:54 +00:00
<?php namespace Tps\Shops\Models;
use Model;
/**
* Model
*/
class ReportDetail extends Model
{
use \October\Rain\Database\Traits\Validation;
2023-08-04 08:35:28 +00:00
2022-09-15 19:49:54 +00:00
/*
* Disable timestamps by default.
* Remove this line if timestamps are defined in the database table.
*/
public $timestamps = false;
/**
* @var string The database table used by the model.
*/
public $table = 'tps_shops_report_details';
/**
* @var array Validation rules
*/
public $rules = [];
public $belongsTo = [
'report' => [
'Tps\Shops\Models\Report'
],
'shop' => [
2023-08-04 08:35:28 +00:00
'Tps\Shops\Models\Shop'
2022-09-15 19:49:54 +00:00
],
];
2023-08-04 08:35:28 +00:00
public function getShopFieldAttribute() {
return $this->shop->name;
}
public function getReportFieldAttribute() {
return $this->report->name;
}
2022-09-15 19:49:54 +00:00
}