v.2.30
Добавлен расширенный отчет по реализации Добавлен монитор активности
This commit is contained in:
@@ -4,6 +4,33 @@ namespace App\Component\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ExchangeItems extends Model {
|
||||
protected $table = 'exchange_items';
|
||||
class ExchangeItems extends Model
|
||||
{
|
||||
protected $table = 'exchange_items';
|
||||
|
||||
/**
|
||||
* Получить информацию о действиях добавления позиции.
|
||||
*/
|
||||
public function create_info()
|
||||
{
|
||||
return $this->hasMany(ExchangeActions::class, 'order_position', 'code')
|
||||
->where('exchange_actions.action_type', '=', 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Получить информацию о действиях удаления позиции.
|
||||
*/
|
||||
public function delete_info()
|
||||
{
|
||||
return $this->hasMany(ExchangeActions::class, 'order_position', 'code')
|
||||
->where('exchange_actions.action_type', '=', 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Получить информацию о заказе.
|
||||
*/
|
||||
public function order()
|
||||
{
|
||||
return $this->hasOne(ExchangeOrders::class, 'code', 'order_code');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user