MexAdminOperation.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace App\Module\Mex\Models;
  3. use App\Module\Mex\Enums\AdminOperationType;
  4. use UCore\ModelCore;
  5. /**
  6. * 农贸市场管理员操作记录模型
  7. *
  8. * field start
  9. * @property int $id 操作记录ID,主键
  10. * @property int $admin_user_id 管理员用户ID
  11. * @property \App\Module\Mex\Enums\AdminOperationType $operation_type 操作类型:INJECT注入,RECYCLE回收
  12. * @property int $item_id 商品ID,关联物品表
  13. * @property int $quantity 操作数量
  14. * @property float $price 操作价格
  15. * @property float $total_amount 操作总金额
  16. * @property int $before_warehouse_quantity 操作前仓库数量
  17. * @property int $after_warehouse_quantity 操作后仓库数量
  18. * @property int $transaction_id 关联的成交记录ID
  19. * @property string $remark 操作备注
  20. * @property \Carbon\Carbon $created_at 操作时间
  21. * field end
  22. */
  23. class MexAdminOperation extends ModelCore
  24. {
  25. protected $table = 'mex_admin_operations';
  26. protected $casts = [
  27. 'admin_user_id' => 'integer',
  28. 'operation_type' => AdminOperationType::class,
  29. 'item_id' => 'integer',
  30. 'quantity' => 'integer',
  31. 'price' => 'decimal:5',
  32. 'total_amount' => 'decimal:5',
  33. 'before_warehouse_quantity' => 'integer',
  34. 'after_warehouse_quantity' => 'integer',
  35. 'transaction_id' => 'integer',
  36. ];
  37. }