feat: finish back-end work (untested)

This commit is contained in:
2025-11-12 12:58:21 -07:00
parent b6a08573f3
commit 8b351524b8
18 changed files with 300 additions and 27 deletions

View File

@@ -0,0 +1,6 @@
package dto
type DeleteOrderItemRequest struct {
OrderId int `json:"order_id"`
ItemId int `json:"item_id"`
}

View File

@@ -0,0 +1,7 @@
package dto
type ItemOrderSetMadeRequest struct {
OrderId int `json:"order_id"`
ItemId int `json:"item_id"`
Made int `json:"made"`
}

View File

@@ -0,0 +1,7 @@
package dto
type ItemOrderSetQuantityRequest struct {
OrderId int `json:"order_id"`
ItemId int `json:"item_id"`
Quantity int `json:"quantity"`
}

View File

@@ -0,0 +1,6 @@
package dto
type OrderFilledResponse struct {
OrderId int `json:"order_id"`
Filled bool `json:"filled"`
}

View File

@@ -0,0 +1,7 @@
package dto
type OrderTableQuery struct {
Orderer string `json:"orderer"`
DateDue string `json:"date_due"`
DatePlaced string `json:"date_placed"`
}

6
api/dto/user_request.go Normal file
View File

@@ -0,0 +1,6 @@
package dto
type UserRequest struct {
Name string `json:"name"`
JobPosition string `json:"job_position"`
}

View File

@@ -3,9 +3,9 @@ package dto
// User response for exposing to the front-end
// :3
type UserResponse struct {
Id int
Name string
Job_Position string
Active bool
Admin bool
Id int `json: "id"`
Name string `json: "name"`
JobPosition string `json: "job_position"`
Active bool `json: "active"`
Admin bool `json: "admin"`
}