package models
import (
"gorm.io/gorm"
"html/template"
)
// Products Server Products 产品
type Products struct {
gorm.Model
Title string `json:"title"` //标题
Synopsis template.HTML `json:"synopsis"` //简介
Detail template.HTML `json:"detail"` //详情
Type string `json:"type"` //类型 1.产品 2.服务
Ptype string `json:"ptype"` //产品类型 软件 硬件
IsIndex bool `json:"isIndex"` //是否首页显示
Url string `json:"url"` //图片链接
ProductIntroduction template.HTML `json:"product_introduction"` //产品介绍
TechnicalParameters template.HTML `json:"technical_parameters"` //技术参数
Instructions template.HTML `json:"instructions"` //使用说明
SupportingSoftware string `json:"supporting_software" ` //配套软件
OptionalAccessories string `json:"optional_accessories" gorm:"comment:'可选配件'"` //可选配件
IsActive bool `json:"is_active" gorm:"comment:'是否激活'"` //是否激活
ParentId int `gorm:"comment:'父级id'" json:"parentId"`
}
type ProductDto struct {
ID uint `json:"id"`
Title string `json:"title"` //标题
Synopsis template.HTML `json:"synopsis"` //简介
Detail template.HTML `json:"detail"` //详情
Type string `json:"type"` //类型 1.产品 2.服务
Ptype string `json:"ptype"` //产品类型 软件 硬件
IsIndex bool `json:"isIndex"` //是否首页显示
Url string `json:"url"` //图片链接
ProductIntroduction template.HTML `json:"product_introduction"` //产品介绍
TechnicalParameters template.HTML `json:"technical_parameters"` //技术参数
Instructions template.HTML `json:"instructions"` //使用说明
SupportingSoftware string `json:"supporting_software" ` //配套软件
OptionalAccessories string `json:"optional_accessories" gorm:"comment:'可选配件'"` //可选配件
IsActive bool `json:"is_active"`
}