mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-04-12 01:17:21 +00:00
add desc
This commit is contained in:
@@ -31,6 +31,7 @@ public class LibraryController {
|
|||||||
Library library = new Library();
|
Library library = new Library();
|
||||||
library.setId(libraryUpsertDto.id());
|
library.setId(libraryUpsertDto.id());
|
||||||
library.setName(libraryUpsertDto.name());
|
library.setName(libraryUpsertDto.name());
|
||||||
|
library.setDesc(libraryUpsertDto.desc());
|
||||||
libraryRepository.merge(library);
|
libraryRepository.merge(library);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ package com.zl.mjga.dto.library;
|
|||||||
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
|
||||||
public record LibraryUpsertDto(Long id, @NotEmpty String name) {}
|
public record LibraryUpsertDto(Long id, @NotEmpty String name, String desc) {}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
CREATE TABLE mjga.library (
|
CREATE TABLE mjga.library (
|
||||||
id BIGSERIAL PRIMARY KEY,
|
id BIGSERIAL PRIMARY KEY,
|
||||||
name VARCHAR NOT NULL UNIQUE,
|
name VARCHAR NOT NULL UNIQUE,
|
||||||
|
desc VARCHAR,
|
||||||
data_count INTEGER NOT NULL DEFAULT 0,
|
data_count INTEGER NOT NULL DEFAULT 0,
|
||||||
create_time TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
|
create_time TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user