1234567891011121314151617181920212223242526 |
- package relation
- import (
- "github.com/gshopify/service-wrapper/model"
- "gshopper.com/gshopify/products/graphql/generated"
- "time"
- )
- type ProductOption struct {
- Id string `db:"id"`
- Name string `db:"name"`
- Values []string `db:"values"`
- Position int8 `db:"position"`
- CreatedAt time.Time `db:"created_at"`
- UpdatedAt time.Time `db:"updated_at"`
- PublishedAt *time.Time `db:"published_at"`
- DeletedAt *time.Time `db:"deleted_at"`
- }
- func (opt *ProductOption) As() *generated.ProductOption {
- return &generated.ProductOption{
- ID: model.NewId(model.GidOption, opt.Id),
- Name: opt.Name,
- Values: opt.Values,
- }
- }
|