'ID', 'mall_id' => 'mall ID', 'coupon_id' => '优惠券', 'event' => '触发事件:1=分享,2=购买并付款', 'send_count' => '最多发放次数,0表示不限制', 'is_delete' => '删除', 'deleted_at' => 'Deleted At', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'type' => '领取人 0--所有人 1--指定用户', 'user_list' => '指定用户id列表', ]; } // 触发事件 const SHARE = 1; const PAY = 2; public function getCoupon() { return $this->hasOne(Coupon::className(), ['id' => 'coupon_id']); } }