- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for mouton (0.09 sec)
-
utils/tests/models.go
} type CouponProduct struct { CouponId int `gorm:"primarykey;size:255"` ProductId string `gorm:"primarykey;size:255"` Desc string } type Order struct { gorm.Model Num string Coupon *Coupon CouponID string } type Parent struct { gorm.Model FavChildID uint FavChild *Child Children []*Child } type Child struct { gorm.Model Name string ParentID *uint
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Dec 15 08:36:08 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/associations_test.go
} if DB.First(&CouponProduct{}, "coupon_id = ? AND product_id = ?", coupon.ID, "full-save-association-product1").Error != nil { t.Errorf("Failed to query saved association") } orders := []Order{{Num: "order1", Coupon: coupon}, {Num: "order2", Coupon: coupon}} if err := DB.Create(&orders).Error; err != nil { t.Errorf("failed to create orders, got %v", err) } coupon2 := Coupon{
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Feb 08 08:29:09 UTC 2023 - 10.9K bytes - Viewed (0) -
tests/tests_test.go
db.Logger = db.Logger.LogMode(logger.Silent) } return } func RunMigrations() { var err error allModels := []interface{}{&User{}, &Account{}, &Pet{}, &Company{}, &Toy{}, &Language{}, &Coupon{}, &CouponProduct{}, &Order{}, &Parent{}, &Child{}, &Tools{}} rand.Seed(time.Now().UnixNano()) rand.Shuffle(len(allModels), func(i, j int) { allModels[i], allModels[j] = allModels[j], allModels[i] })
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Dec 15 08:36:08 UTC 2023 - 3.3K bytes - Viewed (0) -
tests/migrate_test.go
for _, v := range events { AssertEqual(t, v.ID, v.UID) } } // https://github.com/go-gorm/gorm/issues/5300 func TestMigrateWithSpecialName(t *testing.T) { var err error err = DB.AutoMigrate(&Coupon{}) if err != nil { t.Fatalf("AutoMigrate err:%v", err) } err = DB.Table("coupon_product_1").AutoMigrate(&CouponProduct{}) if err != nil { t.Fatalf("AutoMigrate err:%v", err) }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Mar 18 11:24:16 UTC 2024 - 56.2K bytes - Viewed (0)