feat: add shelve management functionality
This commit is contained in:
14
internal/models/requests/shelve_request.go
Normal file
14
internal/models/requests/shelve_request.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package requests
|
||||
|
||||
type CreateShelveRequest struct {
|
||||
CabinetID int64 `json:"cabinetId" binding:"required"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
LevelIndex int32 `json:"levelIndex" binding:"required"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
type UpdateShelveRequest struct {
|
||||
Name string `json:"name"`
|
||||
LevelIndex int32 `json:"levelIndex"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
13
internal/models/responses/shelve_response.go
Normal file
13
internal/models/responses/shelve_response.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package responses
|
||||
|
||||
type CreateShelveResponse struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateShelveResponse struct {
|
||||
ID int64 `json:"id"`
|
||||
CabinetID int64 `json:"cabinetId"`
|
||||
Name string `json:"name"`
|
||||
LevelIndex int32 `json:"levelIndex"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
13
internal/models/shelve_model.go
Normal file
13
internal/models/shelve_model.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Shelve struct {
|
||||
ID int64 `json:"id"`
|
||||
CabinetID int64 `json:"cabinetId"`
|
||||
Name string `json:"name"`
|
||||
LevelIndex int32 `json:"levelIndex"`
|
||||
Description string `json:"description"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
Reference in New Issue
Block a user