Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Team (0.19 sec)

  1. tests/helper_test.go

    		}
    	})
    
    	t.Run("Team", func(t *testing.T) {
    		if len(user.Team) != len(expect.Team) {
    			t.Fatalf("Team should equal, expect: %v, got %v", len(expect.Team), len(user.Team))
    		}
    
    		sort.Slice(user.Team, func(i, j int) bool {
    			return user.Team[i].ID > user.Team[j].ID
    		})
    
    		sort.Slice(expect.Team, func(i, j int) bool {
    			return expect.Team[i].ID > expect.Team[j].ID
    		})
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 8K bytes
    - Viewed (0)
  2. tests/delete_test.go

    		*GetUser("delete_slice_with_associations2", Config{Account: true, Pets: 3, Toys: 2, Company: true, Manager: true, Team: 2, Languages: 2, Friends: 3}),
    		*GetUser("delete_slice_with_associations3", Config{Account: true, Pets: 2, Toys: 3, Company: true, Manager: true, Team: 3, Languages: 3, Friends: 2}),
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 07:03:34 GMT 2023
    - 9.4K bytes
    - Viewed (0)
  3. utils/tests/models.go

    	"time"
    
    	"gorm.io/gorm"
    )
    
    // User has one `Account` (has one), many `Pets` (has many) and `Toys` (has many - polymorphic)
    // He works in a Company (belongs to), he has a Manager (belongs to - single-table), and also managed a Team (has many - single-table)
    // He speaks many languages (many to many) and has many friends (many to many - single-table)
    // His pet also has one Toy (has one - polymorphic)
    // NamedPet is a reference to a named `Pet` (has one)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  4. schema/model_test.go

    	Birthday  *time.Time
    	Account   *tests.Account
    	Pets      []*tests.Pet
    	Toys      []*tests.Toy `gorm:"polymorphic:Owner"`
    	CompanyID *int
    	Company   *tests.Company
    	ManagerID *uint
    	Manager   *User
    	Team      []*User           `gorm:"foreignkey:ManagerID"`
    	Languages []*tests.Language `gorm:"many2many:UserSpeak"`
    	Friends   []*User           `gorm:"many2many:user_friends"`
    	Active    *bool
    }
    
    type (
    	mytime time.Time
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.1K bytes
    - Viewed (0)
Back to top