Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 96 for createdBy (0.72 sec)

  1. schema/schema_test.go

    		{Name: "ID", DBName: "id", BindNames: []string{"VersionModel", "BaseModel", "ID"}, DataType: schema.Uint, PrimaryKey: true, Size: 64, HasDefaultValue: true, AutoIncrement: true},
    		{Name: "CreatedBy", DBName: "created_by", BindNames: []string{"VersionModel", "BaseModel", "CreatedBy"}, DataType: schema.Uint, Size: 64},
    		{Name: "Version", DBName: "version", BindNames: []string{"VersionModel", "Version"}, DataType: schema.Int, Size: 64},
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Dec 15 08:31:23 UTC 2023
    - 12.9K bytes
    - Viewed (0)
  2. schema/model_test.go

    	Birthday     sql.NullTime
    	RegisteredAt mytime
    	DeletedAt    *mytime
    	Active       mybool
    	Admin        *mybool
    }
    
    type BaseModel struct {
    	ID        uint
    	CreatedAt time.Time
    	CreatedBy *int
    	Created   *VersionUser `gorm:"foreignKey:CreatedBy"`
    	UpdatedAt time.Time
    	DeletedAt gorm.DeletedAt `gorm:"index"`
    }
    
    type VersionModel struct {
    	BaseModel
    	Version int
    }
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  3. schema/relationship_test.go

    	type User struct {
    		ID        int32 `gorm:"primaryKey"`
    		Name      string
    		CreatedBy *int32
    		Creator   *User `gorm:"foreignKey:CreatedBy;references:ID"`
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    		Name: "Creator", Type: schema.BelongsTo, Schema: "User", FieldSchema: "User",
    		References: []Reference{{"ID", "User", "CreatedBy", "User", "", false}},
    	})
    }
    
    func TestBelongsToWithMixin(t *testing.T) {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  4. tests/associations_has_many_test.go

    	if err := DB.Model(&user2).Association("Pets").Append(&pet); err != nil {
    		t.Fatalf("Error happened when append account, got %v", err)
    	}
    
    	if pet.ID == 0 {
    		t.Fatalf("Pet's ID should be created")
    	}
    
    	user.Pets = append(user.Pets, &pet)
    	CheckUser(t, user2, user)
    
    	AssertAssociationCount(t, user, "Pets", 3, "AfterAppend")
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 16K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/test/inst_test.go

    // license that can be found in the LICENSE file.
    
    package test
    
    import (
    	"internal/testenv"
    	"os"
    	"path/filepath"
    	"regexp"
    	"testing"
    )
    
    // TestInst tests that only one instantiation of Sort is created, even though generic
    // Sort is used for multiple pointer types across two packages.
    func TestInst(t *testing.T) {
    	testenv.MustHaveGoBuild(t)
    	testenv.MustHaveGoRun(t)
    
    	// Build ptrsort.go, which uses package mysort.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 06 18:07:35 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  6. tests/associations_has_one_test.go

    	if err := DB.Model(&user2).Association("Account").Append(&account); err != nil {
    		t.Fatalf("Error happened when append account, got %v", err)
    	}
    
    	if account.ID == 0 {
    		t.Fatalf("Account's ID should be created")
    	}
    
    	user.Account = account
    	CheckUser(t, user2, user)
    
    	AssertAssociationCount(t, user, "Account", 1, "AfterAppend")
    
    	// Replace
    	account2 := Account{Number: "account-has-one-replace"}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  7. schema/field_test.go

    func TestFieldValuerAndSetter(t *testing.T) {
    	var (
    		userSchema, _ = schema.Parse(&tests.User{}, &sync.Map{}, schema.NamingStrategy{})
    		user          = tests.User{
    			Model: gorm.Model{
    				ID:        10,
    				CreatedAt: time.Now(),
    				UpdatedAt: time.Now(),
    				DeletedAt: gorm.DeletedAt{Time: time.Now(), Valid: true},
    			},
    			Name:     "valuer_and_setter",
    			Age:      18,
    			Birthday: tests.Now(),
    			Active:   true,
    		}
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Feb 19 09:02:53 UTC 2022
    - 12.7K bytes
    - Viewed (0)
  8. tests/postgres_test.go

    func TestPostgresReturningIDWhichHasStringType(t *testing.T) {
    	if DB.Dialector.Name() != "postgres" {
    		t.Skip()
    	}
    
    	type Yasuo struct {
    		ID        string `gorm:"default:gen_random_uuid()"`
    		Name      string
    		CreatedAt time.Time `gorm:"type:TIMESTAMP WITHOUT TIME ZONE"`
    		UpdatedAt time.Time `gorm:"type:TIMESTAMP WITHOUT TIME ZONE;default:current_timestamp"`
    	}
    
    	if err := DB.Exec("CREATE EXTENSION IF NOT EXISTS pgcrypto;").Error; err != nil {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Oct 08 09:16:32 UTC 2022
    - 6.4K bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/testcshared/testdata/libgo2/libgo2.go

    // license that can be found in the LICENSE file.
    
    //go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
    
    package main
    
    // Test a shared library created by -buildmode=c-shared that does not
    // export anything.
    
    import (
    	"fmt"
    	"os"
    	"syscall"
    )
    
    // To test this we want to communicate between the main program and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/closure.go

    	return walkExpr(cfn, init)
    }
    
    // methodValueWrapper returns the ONAME node representing the
    // wrapper function (*-fm) needed for the given method value. If the
    // wrapper function hasn't already been created yet, it's created and
    // added to typecheck.Target.Decls.
    func methodValueWrapper(dot *ir.SelectorExpr) *ir.Name {
    	if dot.Op() != ir.OMETHVALUE {
    		base.Fatalf("methodValueWrapper: unexpected %v (%v)", dot, dot.Op())
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:56:08 UTC 2023
    - 6.5K bytes
    - Viewed (0)
Back to top