'\common\models\User', 'targetAttribute' => 'id'], ['type', 'default', 'value' => EnumUtil::MESSAGE_CONFIRM_BE_USER_DEAL], ['type', 'in', 'range' => EnumUtil::MESSAGE_LIST], ['readed', 'default', 'value' => EnumUtil::NOT_READ], ['readed', 'in', 'range' => EnumUtil::READ_LIST], ]; } public static function findByID($id) { return self::findOne(['id' => $id]); } public function genClientData() { return [ 'id' => $this->id, 'be_user_id' => $this->be_user_id, 'type' => $this->type, 'data' => $this->data, 'readed' => $this->readed, ]; } }