12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace app\common\model;
- use app\common\model\Allocation;
- use app\common\model\Base;
- class AllocationDetail extends Base
- {
- protected $schema = [
- 'id' => 'int',
- 'good_id' => 'int',
- 'create_time' => 'datetime',
- 'update_time' => 'datetime',
- 'delete_time' => 'datetime',
- 'valid' => 'tinyint',
- 'num' => 'float',
- 'date' => 'date',
- 'remark' => 'varchar',
- 'allocation_id' => 'int',
- ];
- public function allocation()
- {
- return $this->belongsTo(Allocation::class);
- }
- public function good()
- {
- return $this->belongsTo(Good::class);
- }
- }
|