search/model/site-model.go

20 lines
528 B
Go

package model
import "time"
type Site struct {
URL string `gorm:"type:varchar(255);primarykey"`
Title string `gorm:"type:varchar(30);not null;"`
Description string `gorm:"type:varchar(255);not null;"`
LinkCount uint `gorm:"index"`
UpdatedAt time.Time `gorm:"index"`
CreatedAt time.Time
}
type SiteObj struct {
Root string `gorm:"type:varchar(20);primarykey"`
Domain string `gorm:"type:varchar(20);primarykey"`
UpdatedAt time.Time `gorm:"index"`
CreatedAt time.Time
}