Files
acc-server-manager/local/model/model.go
Fran Jurmanović 4004d83411
All checks were successful
Release and Deploy / build (push) Successful in 9m5s
Release and Deploy / deploy (push) Successful in 26s
add step list for server creation
2025-09-18 22:24:51 +02:00

41 lines
769 B
Go

package model
import (
"time"
"github.com/gofiber/fiber/v2"
"github.com/google/uuid"
)
type FilteredResponse struct {
Items interface{} `json:"items"`
Params
}
type ResponseFunc func(*fiber.Ctx) *[]interface{}
type MessageResponse struct {
Message string `json:"message"`
}
type Params struct {
SortBy string `json:"sortBy"`
Embed string `json:"embed"`
Page int `json:"page"`
Rpp int `json:"rpp"`
TotalRecords int `json:"totalRecords"`
}
type BaseModel struct {
Id string `json:"id"`
DateCreated time.Time `json:"dateCreated"`
DateUpdated time.Time `json:"dateUpdated"`
}
func (cm *BaseModel) Init() {
date := time.Now()
cm.Id = uuid.NewString()
cm.DateCreated = date
cm.DateUpdated = date
}