-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer.dto.ts
73 lines (55 loc) · 1017 Bytes
/
customer.dto.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import { IsEmail, IsEmpty, Length } from 'class-validator';
export class CreateCustomerInputs {
@IsEmail()
email: string;
@Length(7, 12)
phone: string;
@IsEmpty()
@Length(6, 12)
password: string;
}
export class UserLoginInputs {
@IsEmail()
email: string;
@IsEmpty()
@Length(6, 12)
password: string;
}
export class EditCustomerProfileInputs {
@Length(3, 16)
firstName: string;
@Length(3, 16)
lastName: string;
@Length(6, 16)
address: string;
}
export interface CustomerPayload {
_id: string;
email: string;
verified: boolean;
}
export class CartItem {
_id: string;
unit: number;
}
export class OrderInputs {
txnId: string;
amount: string;
items: [CartItem];
}
export class CreateDeliveryUserInputs {
@IsEmail()
email: string;
@Length(7, 12)
phone: string;
@Length(6, 12)
password: string;
@Length(3, 12)
firstName: string;
@Length(3, 12)
lastName: string;
@Length(6, 24)
address: string;
@Length(4,12)
pincode: string
}