-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add missing dto for database requests (#744)
Signed-off-by: ryjiang <[email protected]>
- Loading branch information
1 parent
535f566
commit ff1c19b
Showing
3 changed files
with
42 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
import { IsString } from 'class-validator'; | ||
import { IsNotEmpty } from 'class-validator'; | ||
|
||
export class CreateDatabaseDto { | ||
@IsString() | ||
export class DatabaseNameDto { | ||
@IsNotEmpty({ message: 'db_name is empty' }) | ||
readonly db_name: string; | ||
} | ||
|
||
export class DatabasePropertiesDto { | ||
@IsNotEmpty({ message: 'properties is empty' }) | ||
readonly properties: Record<string, 'string | number | boolean'>; | ||
} |