1. 复合主键 1. 复合主键可以设置多个字段为主键来开启复合主键功能: type Product struct { ID string `gorm:"primary_key"` LanguageCode string `gorm:"primary_key"` Code string Name string}