AllocationDetail.php 966 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\common\model;
  3. use app\common\model\Allocation;
  4. use app\common\model\Base;
  5. /**
  6. *
  7. * @property int $good_id 物品id
  8. * @property number $num 数量
  9. */
  10. class AllocationDetail extends Base
  11. {
  12. protected $schema = [
  13. 'id' => 'int', // id
  14. 'good_id' => 'int', // 物品ID
  15. 'create_time' => 'datetime', // 创建时间
  16. 'update_time' => 'datetime', // 更新时间
  17. 'delete_time' => 'datetime', // 删除时间
  18. 'valid' => 'tinyint', // 状态,1启用,0禁用
  19. 'num' => 'float', // 数量
  20. 'date' => 'date', // 出入库日期
  21. 'remark' => 'varchar', // 备注
  22. 'allocation_id' => 'int', // 调拔单订单ID
  23. ];
  24. public function allocation()
  25. {
  26. return $this->belongsTo(Allocation::class);
  27. }
  28. public function good()
  29. {
  30. return $this->belongsTo(Good::class);
  31. }
  32. }