24 lines
689 B
Go
24 lines
689 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// ServiceTitle model structure
|
|
// Stores title data for services section.
|
|
type ServiceTitle struct {
|
|
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey" json:"id"`
|
|
Title string `gorm:"type:varchar(254);not null" json:"title"`
|
|
TitleSub string `gorm:"type:varchar(254);not null" json:"title_sub"`
|
|
IsActive bool `gorm:"default:false" json:"is_active"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
// TableName overrides the table name used by ServiceTitle to `services_title`
|
|
func (ServiceTitle) TableName() string {
|
|
return "services_title"
|
|
}
|