21 lines
908 B
Go
21 lines
908 B
Go
package entity
|
|
|
|
import "time"
|
|
|
|
type AboutUsContent struct {
|
|
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
|
|
PrimaryTitle string `json:"primary_title" gorm:"type:varchar(255)"`
|
|
SecondaryTitle string `json:"secondary_title" gorm:"type:varchar(255)"`
|
|
Description string `json:"description" gorm:"type:text"`
|
|
PrimaryCta string `json:"primary_cta" gorm:"type:varchar(255)"`
|
|
SecondaryCtaText string `json:"secondary_cta_text" gorm:"type:varchar(255)"`
|
|
IsActive *bool `json:"is_active" gorm:"type:bool;default:true"`
|
|
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
|
|
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
|
|
|
|
Images []AboutUsContentImage `json:"images,omitempty" gorm:"foreignKey:AboutUsContentID"`
|
|
}
|
|
|
|
func (AboutUsContent) TableName() string {
|
|
return "about_us_contents"
|
|
} |