46 lines
2.2 KiB
Go
46 lines
2.2 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// About model structure
|
|
// Stores public about information with optional media.
|
|
type About struct {
|
|
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey" json:"id"`
|
|
Title string `gorm:"type:varchar(254);not null" json:"title"`
|
|
Image string `gorm:"type:text" json:"image,omitempty"`
|
|
ImageSub string `gorm:"type:text" json:"image_sub,omitempty"`
|
|
CV string `gorm:"type:text" json:"cv,omitempty"`
|
|
Birthday string `gorm:"type:varchar(254)" json:"birthday,omitempty"`
|
|
City string `gorm:"type:varchar(254)" json:"city,omitempty"`
|
|
Study string `gorm:"type:varchar(254)" json:"study,omitempty"`
|
|
Website string `gorm:"type:varchar(254)" json:"website,omitempty"`
|
|
Phone string `gorm:"type:varchar(254)" json:"phone,omitempty"`
|
|
Age string `gorm:"type:varchar(5)" json:"age,omitempty"`
|
|
Interests string `gorm:"type:varchar(254)" json:"interests,omitempty"`
|
|
Degree string `gorm:"type:varchar(254)" json:"degree,omitempty"`
|
|
X string `gorm:"type:varchar(254)" json:"x,omitempty"`
|
|
Mail string `gorm:"type:varchar(254)" json:"mail,omitempty"`
|
|
Done *int `json:"done,omitempty"`
|
|
ProjectDone string `gorm:"type:varchar(254)" json:"project_done,omitempty"`
|
|
UserH *int `json:"user_h,omitempty"`
|
|
HapyUser string `gorm:"type:varchar(254)" json:"hapy_user,omitempty"`
|
|
Great *int `json:"great,omitempty"`
|
|
GreatReviews string `gorm:"type:varchar(254)" json:"great_reviews,omitempty"`
|
|
Team *int `json:"team,omitempty"`
|
|
SupportTeam string `gorm:"type:varchar(254)" json:"support_team,omitempty"`
|
|
Slug string `gorm:"type:varchar(250);uniqueIndex;not null" json:"slug"`
|
|
IsActive bool `gorm:"default:false" json:"is_active"`
|
|
CounterActive bool `gorm:"default:false" json:"counter_active"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
// TableName overrides the table name used by About to `about`
|
|
func (About) TableName() string {
|
|
return "about"
|
|
}
|