feature (db): Add support for multi-column PKs (#1658)

This commit is contained in:
Jim authored and GitHub committed 2021-11-03 14:04:47 -04:00
1 parent 8d3f666bba
commit 4df3b40def
9 files changed
+526 -69

No files matched your search

@@ -118,4 +118,27 @@ message StoreTestScooter {
// @inject_tag: `gorm:"default:null"`
int32 mpg = 7;
}
// StoreTestAccessory used in the db tests only and provides a gorm resource with
// an id that's not a private or public id
message StoreTestAccessory {
// @inject_tag: gorm:"primary_key"
uint32 accessory_id = 1;
// @inject_tag: `gorm:"default:not_null"`
string description = 2;
}
// StoreTestScooterAccessory used in the db tests only and provides a gorm
// resource with multiple pks
message StoreTestScooterAccessory {
// @inject_tag: gorm:"primary_key"
uint32 accessory_id = 1;
// @inject_tag: gorm:"primary_key"
uint32 scooter_id = 2;
// @inject_tag: `gorm:"default:null"`
string review = 3;
}