move to required ids

This commit is contained in:
rubikscraft
2022-04-01 12:04:49 +02:00
parent c6d1206e29
commit 9bcf09ff4f
18 changed files with 48 additions and 54 deletions

View File

@@ -4,7 +4,7 @@ import { EntityID } from '../validators/entity-id.validator';
export class EImage {
@EntityID()
id?: string;
id: string;
@IsHash('sha256')
hash: string;

View File

@@ -19,5 +19,5 @@ export class RoleNamePermsObject extends RoleNameObject {
export class ERole extends RoleNamePermsObject {
@EntityID()
id?: string;
id: string;
}

View File

@@ -3,7 +3,7 @@ import { EntityID } from '../validators/entity-id.validator';
export class ESysPreference {
@EntityID()
id?: string;
id: string;
@IsNotEmpty()
@IsString()

View File

@@ -28,7 +28,7 @@ export class NameRolesUser extends UsernameUser {
// Actual entity that goes in the db
export class EUser extends NameRolesUser {
@EntityID()
id?: string;
id: string;
@IsOptional()
@Exclude()

View File

@@ -4,7 +4,7 @@ import { IsPosInt } from '../validators/positive-int.validator';
export class EUsrPreference {
@EntityID()
id?: string;
id: string;
@IsNotEmpty()
@IsString()