255], [['card_pic_url'], 'string', 'max' => 2048], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'user_id' => '用户ID', 'card_id' => '卡券ID', 'card_name' => '卡券名称', 'card_pic_url' => '卡券图片', 'card_content' => '卡券描述', 'is_use' => '是否使用 0--未使用 1--已使用', 'is_delete' => 'Is Delete', 'addtime' => 'Addtime', 'clerk_id' => '核销人id', 'shop_id' => '门店ID', 'clerk_time' => ' 核销时间', 'order_id' => '发放卡券的订单ID', 'goods_id' => '商品ID', ]; } public function afterSave($insert, $changedAttributes) { $data = $insert ? json_encode($this->attributes) : json_encode($changedAttributes); CommonActionLog::storeActionLog('', $insert, $this->is_delete, $data, $this->id); } }