Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 7 of 7 for product_id (0.06 seconds)

  1. schema/schema_test.go

    	if err != nil {
    		t.Fatalf("failed to parse product struct with composite primary key, got error %v", err)
    	}
    
    	prioritizedPrimaryField := schema.Field{
    		Name: "ProductID", DBName: "product_id", BindNames: []string{"ProductID"}, DataType: schema.Uint, PrimaryKey: true, Size: 64, HasDefaultValue: true, AutoIncrement: true, TagSettings: map[string]string{"PRIMARYKEY": "PRIMARYKEY", "AUTOINCREMENT": "AUTOINCREMENT"},
    	}
    
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Thu Aug 28 02:57:17 GMT 2025
    - 13.3K bytes
    - Click Count (0)
  2. tests/associations_test.go

    	}
    
    	if DB.First(&Coupon{}, "id = ?", coupon.ID).Error != nil {
    		t.Errorf("Failed to query saved coupon")
    	}
    
    	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}}
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Fri Sep 12 04:33:27 GMT 2025
    - 13.3K bytes
    - Click Count (0)
  3. tests/hooks_test.go

    type Product4 struct {
    	gorm.Model
    	Name  string
    	Code  string
    	Price int64
    	Owner string
    	Item  ProductItem
    }
    
    type ProductItem struct {
    	gorm.Model
    	Code               string
    	Product4ID         uint
    	AfterFindCallTimes int
    }
    
    func (pi ProductItem) BeforeCreate(*gorm.DB) error {
    	if pi.Code == "invalid" {
    		return errors.New("invalid item")
    	}
    	return nil
    }
    
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Mon Jun 17 03:59:06 GMT 2024
    - 16.7K bytes
    - Click Count (0)
  4. utils/tests/models.go

    	AmountOff        uint32           `gorm:"column:amount_off"`
    	PercentOff       float32          `gorm:"column:percent_off"`
    }
    
    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
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 2.1K bytes
    - Click Count (0)
  5. fastapi/.agents/skills/fastapi/SKILL.md

    @app.post("/items/")
    async def create_item(item: Item, project_id: Annotated[int, Query()]): ...
    ```
    
    instead of this:
    
    ```python
    # DO NOT DO THIS
    class Item(BaseModel):
        name: str = ...
        description: str | None = None
        price: float = Field(..., gt=0)
    
    
    app = FastAPI()
    
    
    @app.post("/items/")
    async def create_item(item: Item, project_id: Annotated[int, Query(...)]): ...
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 10:05:57 GMT 2026
    - 10.1K bytes
    - Click Count (0)
  6. tests/create_test.go

    		t.Fatalf("first or create rows affect err:%v rows:%d", res.Error, res.RowsAffected)
    	}
    }
    
    func TestCreateWithAutoIncrementCompositeKey(t *testing.T) {
    	type CompositeKeyProduct struct {
    		ProductID    int `gorm:"primaryKey;autoIncrement:true;"` // primary key
    		LanguageCode int `gorm:"primaryKey;"`                    // primary key
    		Code         string
    		Name         string
    	}
    
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Mon Jul 21 09:55:20 GMT 2025
    - 26.8K bytes
    - Click Count (0)
  7. docs/fr/docs/async.md

    ///
    
    ---
    
    Imaginez que vous êtes l'ordinateur / le programme 🤖 dans cette histoire.
    
    Pendant que vous faites la queue, vous être simplement inactif 😴, attendant votre tour, ne faisant rien de « productif ». Mais la queue est rapide car le serveur 💁 prend seulement les commandes (et ne les prépare pas), donc tout va bien.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 27.3K bytes
    - Click Count (0)
Back to Top