-
Notifications
You must be signed in to change notification settings - Fork 1
/
pendingOrder.model.ts
53 lines (41 loc) · 1.18 KB
/
pendingOrder.model.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { ArgsType, Field, ObjectType } from 'type-graphql';
import { IsString } from 'class-validator';
@ObjectType()
export class PendingOrderData {
@Field(() => String, { nullable: false })
id!: string;
@Field(() => String, { nullable: false })
createdByAccount!: string;
@Field(() => String, { nullable: false })
signer!: string;
@Field(() => String, { nullable: true })
target?: string;
@Field(() => String, { nullable: false })
destination!: string;
@Field(() => String, { nullable: false })
clientId!: string;
@Field(() => Boolean, { nullable: false })
purchaseInterrupted!: boolean;
@Field(() => Date, { nullable: false })
timestamp!: Date;
constructor(props?: Partial<PendingOrderData>) {
Object.assign(this, props);
}
}
@ObjectType()
export class PendingOrdersList {
@Field(() => [PendingOrderData], { nullable: false })
orders!: PendingOrderData[];
constructor(props?: Partial<PendingOrdersList>) {
Object.assign(this, props);
}
}
@ArgsType()
export class GetPendingOrdersByIdsArgs {
@IsString({ each: true })
@Field(() => [String!]!, {
nullable: false,
description: 'Pending Order domain names list.'
})
ids!: string[];
}