src/shared/dto/on-chain-field.dto.ts
Properties |
| name |
Type : string
|
Decorators :
@ApiProperty({type: 'string'})
|
|
Defined in src/shared/dto/on-chain-field.dto.ts:9
|
| type |
Type : DataFieldType
|
Decorators :
@ApiProperty({required: true, enumName: 'The registry type', enum: undefined})
|
|
Defined in src/shared/dto/on-chain-field.dto.ts:25
|
| value |
Decorators :
@ApiProperty({type: 'string'})
|
|
Defined in src/shared/dto/on-chain-field.dto.ts:29
|
import { ApiProperty } from "@nestjs/swagger";
import { IsString, IsNotEmpty, IsEnum } from "class-validator";
import { DataFieldType } from "src/admin/EternalRegistry.interface";
export class OnChainFieldDTO {
@ApiProperty({ type: "string" })
@IsString()
@IsNotEmpty()
name: string;
@ApiProperty({
required: true,
enumName: "The registry type",
enum: [
"Uint",
"Bool",
"String",
"Bytes",
"Address",
"AddressArrayIndexValue",
"getAddressArray",
],
})
@IsEnum(DataFieldType)
type: DataFieldType;
@ApiProperty({ type: "string" })
@IsNotEmpty()
value: unknown;
}