package models
import (
"gorm.io/gorm"
"html/template"
)
type Server struct {
gorm.Model
Title string `json:"title" gorm:"comment:'标题'"`
Synopsis template.HTML `json:"synopsis" gorm:"comment:'简介'"` //简介
Detail template.HTML `json:"detail" gorm:"comment:'详情'"` //详情
ProductId uint `json:"product_id" gorm:"comment:'产品ID'"` //产品id
Image string `json:"image" gorm:"comment:'图片链接'"`
}
type ServerDto struct {
ID uint `json:"id"`
Title string `json:"title" validate:"required"`
Synopsis template.HTML `json:"synopsis" validate:"required"` //简介
Detail template.HTML `json:"detail" validate:"required"` //详情
ProductId uint `json:"product_id" validate:"required"` //产品id
Image string `json:"image" validate:"required"`
}