255], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'user_id' => 'User ID', 'coupon_id' => 'Coupon ID', 'order_no' => 'Order No', 'is_pay' => 'Is Pay', 'pay_time' => 'Pay Time', 'price' => 'Price', 'integral' => 'Integral', 'addtime' => 'Addtime', ]; } public function afterSave($insert, $changedAttributes) { $data = $insert ? json_encode($this->attributes) : json_encode($changedAttributes); CommonActionLog::storeActionLog('', $insert, 0, $data, $this->id); } public function getUser() { return $this->hasOne(User::className(),['id' => 'user_id']); } }