摘要: 0. create table naming strategy DB, err := gorm.Open(mysql.Open(dsn), &gorm.Config{ NamingStrategy: schema.NamingStrategy{ //TablePrefix: "mxshop_", / 阅读全文
posted @ 2023-11-12 22:50 PEAR2020 阅读(20) 评论(0) 推荐(0)
摘要: type Goods struct { BaseModel CategoryID int32 `gorm:"type:int;not null"` Category Category BrandsID int32 `gorm:"type:int;not null"` Brands Brands } 阅读全文
posted @ 2023-11-12 16:34 PEAR2020 阅读(37) 评论(0) 推荐(0)