MexWarehouse.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace App\Module\Mex\Models;
  3. use UCore\ModelCore;
  4. /**
  5. * 农贸市场系统仓库模型
  6. *
  7. * field start
  8. * @property int $id 记录ID,主键
  9. * @property int $item_id 商品ID,关联物品表
  10. * @property int $quantity 库存数量
  11. * @property float $total_buy_amount 累计买入金额
  12. * @property float $total_sell_amount 累计卖出金额
  13. * @property int $total_buy_quantity 累计买入数量
  14. * @property int $total_sell_quantity 累计卖出数量
  15. * @property \Carbon\Carbon $last_transaction_at 最后交易时间
  16. * @property \Carbon\Carbon $created_at 创建时间
  17. * @property \Carbon\Carbon $updated_at 更新时间
  18. * field end
  19. */
  20. class MexWarehouse extends ModelCore
  21. {
  22. protected $table = 'mex_warehouse';
  23. protected $casts = [
  24. 'item_id' => 'integer',
  25. 'quantity' => 'integer',
  26. 'total_buy_amount' => 'decimal:5',
  27. 'total_sell_amount' => 'decimal:5',
  28. 'total_buy_quantity' => 'integer',
  29. 'total_sell_quantity' => 'integer',
  30. 'last_transaction_at' => 'datetime',
  31. ];
  32. }