| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace App\Module\Mex\Models;
- use UCore\ModelCore;
- /**
- * 农贸市场系统仓库模型
- *
- * field start
- * @property int $id 记录ID,主键
- * @property int $item_id 商品ID,关联物品表
- * @property int $quantity 库存数量
- * @property float $total_buy_amount 累计买入金额
- * @property float $total_sell_amount 累计卖出金额
- * @property int $total_buy_quantity 累计买入数量
- * @property int $total_sell_quantity 累计卖出数量
- * @property \Carbon\Carbon $last_transaction_at 最后交易时间
- * @property \Carbon\Carbon $created_at 创建时间
- * @property \Carbon\Carbon $updated_at 更新时间
- * field end
- */
- class MexWarehouse extends ModelCore
- {
- protected $table = 'mex_warehouse';
- protected $fillable = [
- 'item_id',
- 'quantity',
- 'total_buy_amount',
- 'total_sell_amount',
- 'total_buy_quantity',
- 'total_sell_quantity',
- 'last_transaction_at',
- ];
- protected $casts = [
- 'item_id' => 'integer',
- 'quantity' => 'integer',
- 'total_buy_amount' => 'decimal:5',
- 'total_sell_amount' => 'decimal:5',
- 'total_buy_quantity' => 'integer',
- 'total_sell_quantity' => 'integer',
- 'last_transaction_at' => 'datetime',
- ];
- }
|