src/models/key-value.model.ts
Properties |
name |
Type : string
|
Decorators :
@IsString()
|
Defined in src/models/key-value.model.ts:14
|
value |
Type : string
|
Decorators :
@IsString()
|
Defined in src/models/key-value.model.ts:19
|
import { prop } from '@typegoose/typegoose'
import { IsString, IsNotEmpty } from 'class-validator'
export class KeyValueModel {
@IsString()
@IsNotEmpty()
@prop({ required: false, validate: /\S+/ })
name: string
@IsString()
@IsNotEmpty()
@prop({ required: false, validate: /\S+/ })
value: string
}