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"` ProductId string `db:"product_id"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_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, } }