mirror of
https://github.com/vran-dev/databasir.git
synced 2025-08-08 18:25:17 +08:00
feature: support add description to table or column (#46)
* feat: generate document description model * feat: add description field to document * fix: checkstyle * feat:update frontend resources
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package com.databasir.api;
|
||||
|
||||
import com.databasir.api.config.security.DatabasirUserDetails;
|
||||
import com.databasir.common.JsonData;
|
||||
import com.databasir.core.domain.description.data.DocumentDescriptionSaveRequest;
|
||||
import com.databasir.core.domain.description.service.DocumentDescriptionService;
|
||||
import com.databasir.core.domain.log.annotation.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
public class DocumentDescriptionController {
|
||||
|
||||
private final DocumentDescriptionService documentDescriptionService;
|
||||
|
||||
@PostMapping(Routes.DocumentDescription.SAVE)
|
||||
@PreAuthorize("hasAnyAuthority('SYS_OWNER', 'GROUP_OWNER?groupId='+#groupId, 'GROUP_MEMBER?groupId='+#groupId)")
|
||||
@Operation(module = Operation.Modules.PROJECT,
|
||||
name = "更新描述",
|
||||
involvedProjectId = "#projectId")
|
||||
public JsonData<Void> save(@PathVariable Integer groupId,
|
||||
@PathVariable Integer projectId,
|
||||
@RequestBody @Valid DocumentDescriptionSaveRequest request) {
|
||||
DatabasirUserDetails principal = (DatabasirUserDetails) SecurityContextHolder.getContext()
|
||||
.getAuthentication()
|
||||
.getPrincipal();
|
||||
Integer userId = principal.getUserPojo().getId();
|
||||
documentDescriptionService.save(groupId, projectId, userId, request);
|
||||
return JsonData.ok();
|
||||
}
|
||||
}
|
@@ -96,6 +96,13 @@ public interface Routes {
|
||||
String DELETE = DISCUSSION_BASE + "/{discussionId}";
|
||||
}
|
||||
|
||||
interface DocumentDescription {
|
||||
|
||||
String DISCUSSION_BASE = BASE + "/groups/{groupId}/projects/{projectId}/descriptions";
|
||||
|
||||
String SAVE = DISCUSSION_BASE;
|
||||
}
|
||||
|
||||
interface Setting {
|
||||
|
||||
String GET_SYS_EMAIL = BASE + "/settings/sys_email";
|
||||
|
@@ -1 +1 @@
|
||||
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>databasir-frontend</title><script defer="defer" type="module" src="/js/chunk-vendors.45746587.js"></script><script defer="defer" type="module" src="/js/app.6aec33ce.js"></script><link href="/css/chunk-vendors.8e1003a6.css" rel="stylesheet"><link href="/css/app.757c1ef3.css" rel="stylesheet"><script defer="defer" src="/js/chunk-vendors-legacy.54c3660b.js" nomodule></script><script defer="defer" src="/js/app-legacy.b19c33c1.js" nomodule></script></head><body><noscript><strong>We're sorry but databasir-frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
||||
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>databasir-frontend</title><script defer="defer" type="module" src="/js/chunk-vendors.45746587.js"></script><script defer="defer" type="module" src="/js/app.92d4b356.js"></script><link href="/css/chunk-vendors.8e1003a6.css" rel="stylesheet"><link href="/css/app.757c1ef3.css" rel="stylesheet"><script defer="defer" src="/js/chunk-vendors-legacy.54c3660b.js" nomodule></script><script defer="defer" src="/js/app-legacy.8031b9be.js" nomodule></script></head><body><noscript><strong>We're sorry but databasir-frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
api/src/main/resources/static/js/956.9bdc4a48.js.map
Normal file
1
api/src/main/resources/static/js/956.9bdc4a48.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
api/src/main/resources/static/js/app-legacy.8031b9be.js
Normal file
2
api/src/main/resources/static/js/app-legacy.8031b9be.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
api/src/main/resources/static/js/app.92d4b356.js
Normal file
2
api/src/main/resources/static/js/app.92d4b356.js
Normal file
File diff suppressed because one or more lines are too long
1
api/src/main/resources/static/js/app.92d4b356.js.map
Normal file
1
api/src/main/resources/static/js/app.92d4b356.js.map
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user