feat: add shelve management functionality

This commit is contained in:
Tran Anh Tuan
2026-05-08 18:17:07 +07:00
parent 8562d39071
commit 9f27436d5d
14 changed files with 2682 additions and 1074 deletions

View 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"`
}

View 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"`
}

View 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"`
}