123456789101112131415161718192021222324252627282930 |
- <?php
- namespace app\common\model;
- /**
- * @property number $num
- */
- class Stock extends Base
- {
- protected $schema = [
- 'id' => 'int', // id
- 'repo_id' => 'int', // 仓库ID
- 'good_id' => 'int', // 物品ID
- 'create_time' => 'datetime', // 创建时间
- 'update_time' => 'datetime', // 更新时间
- 'delete_time' => 'datetime', // 删除时间
- 'valid' => 'tinyint', // 状态,1启用,0禁用
- 'num' => 'float', // 数量
- ];
- public function repo()
- {
- return $this->belongsTo(Repo::class);
- }
- public function good()
- {
- return $this->belongsTo(Good::class);
- }
- }
|