2025-06-19 10:33:58 +08:00

48 lines
1.0 KiB
Go

package schema
import (
"time"
"github.guxuan/haibei/pkg/util"
)
// Defining the `Point` struct.
type Point struct {
ID string `json:"id" gorm:"size:20;primaryKey;"` // Unique ID
CreatedAt time.Time `json:"created_at" gorm:"index;"` // Create time
UpdatedAt time.Time `json:"updated_at" gorm:"index;"` // Update time
}
// Defining the query parameters for the `Point` struct.
type PointQueryParam struct {
util.PaginationParam
}
// Defining the query options for the `Point` struct.
type PointQueryOptions struct {
util.QueryOptions
}
// Defining the query result for the `Point` struct.
type PointQueryResult struct {
Data Points
PageResult *util.PaginationResult
}
// Defining the slice of `Point` struct.
type Points []*Point
// Defining the data structure for creating a `Point` struct.
type PointForm struct {
}
// A validation function for the `PointForm` struct.
func (a *PointForm) Validate() error {
return nil
}
// Convert `PointForm` to `Point` object.
func (a *PointForm) FillTo(point *Point) error {
return nil
}