feat: add cabinet management functionality
This commit is contained in:
12
internal/models/cabinet_model.go
Normal file
12
internal/models/cabinet_model.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Cabinet struct {
|
||||
ID int64 `json:"id"`
|
||||
RoomID int64 `json:"roomId"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
12
internal/models/requests/cabinet_request.go
Normal file
12
internal/models/requests/cabinet_request.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package requests
|
||||
|
||||
type CreateCabinetRequest struct {
|
||||
RoomID int64 `json:"roomId" binding:"required"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
type UpdateCabinetRequest struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
12
internal/models/responses/cabinet_response.go
Normal file
12
internal/models/responses/cabinet_response.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package responses
|
||||
|
||||
type CreateCabinetResponse struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateCabinetResponse struct {
|
||||
ID int64 `json:"id"`
|
||||
RoomID int64 `json:"roomId"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
Reference in New Issue
Block a user