12345678910111213141516171819202122232425262728 |
- <?php
- namespace app\cxinv\model;
- use think\model\concern\SoftDelete;
- class ProductsCombind extends Base
- {
- use SoftDelete;
- //设置字段信息
- protected $schema = [
- 'id' =>'bigint',//
- 'parent_id' =>'bigint',//组合商品id
- 'child_id' =>'bigint',//子商品id
- 'child_num' =>'int',//子商品每单位对应数量
- 'create_time' =>'datetime',//
- 'delete_time' =>'datetime',//
- ];
- protected $createTime = 'create_time';
- protected $updateTime = false;
- protected $deleteTime = 'delete_time';
- public function Products(){
- return $this->hasOne('FinancialProducts','id','child_id');
- }
- public static function CombindAddStock($pid,$num){
- }
- }
|