feat: shelf creation

This commit is contained in:
2024-01-20 01:46:47 -06:00
parent ec1e703f78
commit 75ca6ff6c0
4 changed files with 44 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
package types
import (
"net/http"
"time"
"gorm.io/gorm"
@@ -23,6 +24,12 @@ type Building struct {
Requests
*/
type CreateBuildingRequest struct {
Name string `json:"name"`
}
func (c CreateBuildingRequest) Bind(r *http.Request) error { return nil }
/*
Responses
*/

View File

@@ -1,6 +1,7 @@
package types
import (
"net/http"
"time"
"gorm.io/gorm"
@@ -27,6 +28,15 @@ type ShelfLocation struct {
Requests
*/
type CreateShelfRequest struct {
Name string `json:"name"`
RoomNumber string `json:"room_number,omitempty"`
Description string `json:"description,omitempty"`
BuildingID uint64 `json:"building_id"`
}
func (c CreateShelfRequest) Bind(r *http.Request) error { return nil }
/*
Responses
*/