1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package models
- import (
- "gorm.io/gorm"
- "html/template"
- )
- type Products struct {
- gorm.Model
- Title string `json:"title"`
- Synopsis template.HTML `json:"synopsis"`
- Detail template.HTML `json:"detail"`
- Type string `json:"type"`
- 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"`
- 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"`
- }
|