g_sto/plugins/romanah/gokbakja/models/Product.php

40 lines
728 B
PHP

<?php namespace Romanah\Gokbakja\Models;
use Model;
/**
* Model
*/
class Product extends Model
{
use \October\Rain\Database\Traits\Validation;
/**
* @var string The database table used by the model.
*/
public $table = 'romanah_gokbakja_product';
public $hasMany = [
'action' => [
'Romanah\Gokbakja\Models\Action',
'key' => 'product_id'
],
'order_items' => [
'Romanah\Gokbakja\Models\OrderItem',
'key' => 'product_id'
]
];
public function scopeGetReport($query)
{
return $query->where('report', 'simple');
}
/**
* @var array Validation rules
*/
public $rules = [
];
}