-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct_response.go
39 lines (33 loc) · 1021 Bytes
/
product_response.go
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
package response
import "time"
type ProductCreateResponse struct {
ID int `json:"id"`
Title string `json:"title"`
Price int `json:"price"`
Stock int `json:"stock"`
CategoryID int `json:"category_id"`
CreatedAt time.Time `json:"created_at"`
}
type ProductGetResponse struct {
ID int `json:"id"`
Title string `json:"title"`
Price int `json:"price"`
Stock int `json:"stock"`
CategoryID int `json:"category_id"`
CreatedAt time.Time `json:"created_at"`
}
type ProductUpdateResponse struct {
Product ProductUpdate `json:"product"`
}
type ProductUpdate struct {
ID int `json:"id"`
Title string `json:"title"`
Price string `json:"price"`
Stock int `json:"stock"`
CategoryID int `json:"category_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type ProductDeleteResponse struct {
Message string `json:"message"`
}