exchange: github.com/qor/exchange/tests Index | Files

package tests

import "github.com/qor/exchange/tests"

Index

Package Files

exchange.go models.go

Variables

var (
    // DB db used for testing
    DB  = utils.TestDB()
    // ProductExchangeResource import product exchange definition
    ProductExchangeResource = exchange.NewResource(&Product{}, exchange.Config{PrimaryField: "Code"})
)

type Category Uses

type Category struct {
    gorm.Model
    Name string
}

type Product Uses

type Product struct {
    gorm.Model
    Code       string
    Name       string
    Price      float64
    Tag        *string
    Category   Category
    CategoryID *uint
}

Package tests imports 3 packages (graph). Updated 2017-11-28. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).