excel-export/data/common.go

41 lines
678 B
Go

package data
type OurProduct struct {
Id int64 `gorm:"column:id"`
Name string `gorm:"column:name"`
}
func (o OurProduct) TableName() string {
return "ours_product"
}
type Platform struct {
Id int64
Name string
}
func (p Platform) TableName() string {
return "platform"
}
type PlatformProduct struct {
Id int64
PlatformId int64
Name string
Code string
Platform Platform `gorm:"foreignkey:id;references:platform_id"`
}
func (p PlatformProduct) TableName() string {
return "platform_product"
}
type Reseller struct {
Id int64 `gorm:"primaryKey;column:id"`
Name string
}
func (o Reseller) TableName() string {
return "reseller"
}