model

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllTodoType = []TodoType{
	TodoTypeBug,
	TodoTypeFeature,
}

Functions

func GetInputStruct added in v0.2.0

func GetInputStruct(name string, obj map[string]interface{}) (interface{}, error)

Types

type AddCatPayload

type AddCatPayload struct {
	Cat      *CatQueryResult `json:"cat"`
	Affected []*Cat          `json:"affected"`
}

type AddCompanyPayload

type AddCompanyPayload struct {
	Company  *CompanyQueryResult `json:"company"`
	Affected []*Company          `json:"affected"`
}

type AddSmartPhonePayload added in v0.1.5

type AddSmartPhonePayload struct {
	SmartPhone *SmartPhoneQueryResult `json:"smartPhone"`
	Affected   []*SmartPhone          `json:"affected"`
}

type AddTodoPayload

type AddTodoPayload struct {
	Todo     *TodoQueryResult `json:"todo"`
	Affected []*Todo          `json:"affected"`
}

type AddUserPayload

type AddUserPayload struct {
	User     *UserQueryResult `json:"user"`
	Affected []*User          `json:"affected"`
}

type BooleanFilterInput

type BooleanFilterInput struct {
	And     []*bool             `json:"and,omitempty"`
	Or      []*bool             `json:"or,omitempty"`
	Not     *BooleanFilterInput `json:"not,omitempty"`
	Is      *bool               `json:"is,omitempty"`
	Null    *bool               `json:"null,omitempty"`
	NotNull *bool               `json:"notNull,omitempty"`
}

func (*BooleanFilterInput) ExtendsDatabaseQuery

func (d *BooleanFilterInput) ExtendsDatabaseQuery(db *gorm.DB, fieldName string, deep bool, blackList map[string]struct{}) []runtimehelper.ConditionElement

type Cat

type Cat struct {
	ID       int       `json:"id" gorm:"primaryKey;autoIncrement;"`
	Name     string    `json:"name"`
	BirthDay time.Time `json:"birthDay"`
	Age      *int      `json:"age,omitempty" gorm:"-;"`
	UserID   int       `json:"userID"`
	Alive    *bool     `json:"alive,omitempty" gorm:"default:true;"`
}

type CatFiltersInput

type CatFiltersInput struct {
	ID       *IDFilterInput      `json:"id,omitempty"`
	Name     *StringFilterInput  `json:"name,omitempty"`
	BirthDay *TimeFilterInput    `json:"birthDay,omitempty"`
	UserID   *IntFilterInput     `json:"userID,omitempty"`
	Alive    *BooleanFilterInput `json:"alive,omitempty"`
	And      []*CatFiltersInput  `json:"and,omitempty"`
	Or       []*CatFiltersInput  `json:"or,omitempty"`
	Not      *CatFiltersInput    `json:"not,omitempty"`
}

func (*CatFiltersInput) ExtendsDatabaseQuery

func (d *CatFiltersInput) ExtendsDatabaseQuery(db *gorm.DB, alias string, deep bool, blackList map[string]struct{}) []runtimehelper.ConditionElement

func (*CatFiltersInput) PrimaryKeyName

func (d *CatFiltersInput) PrimaryKeyName() string

type CatInput

type CatInput struct {
	Name     string    `json:"name"`
	BirthDay time.Time `json:"birthDay"`
	UserID   int       `json:"userID"`
	Alive    *bool     `json:"alive,omitempty"`
}

func CatInputFromMap added in v0.2.0

func CatInputFromMap(data map[string]interface{}) (CatInput, error)

func (*CatInput) MergeToType

func (d *CatInput) MergeToType() Cat

type CatOrder

type CatOrder struct {
	Asc  *CatOrderable `json:"asc,omitempty"`
	Desc *CatOrderable `json:"desc,omitempty"`
}

type CatOrderable

type CatOrderable string
const (
	CatOrderableID     CatOrderable = "id"
	CatOrderableName   CatOrderable = "name"
	CatOrderableUserID CatOrderable = "userID"
	CatOrderableAlive  CatOrderable = "alive"
)

func (CatOrderable) IsValid

func (e CatOrderable) IsValid() bool

func (CatOrderable) MarshalGQL

func (e CatOrderable) MarshalGQL(w io.Writer)

func (CatOrderable) String

func (e CatOrderable) String() string

func (*CatOrderable) UnmarshalGQL

func (e *CatOrderable) UnmarshalGQL(v interface{}) error

type CatPatch

type CatPatch struct {
	Name     *string    `json:"name,omitempty"`
	BirthDay *time.Time `json:"birthDay,omitempty"`
	UserID   *int       `json:"userID,omitempty"`
	Alive    *bool      `json:"alive,omitempty"`
}

func (*CatPatch) MergeToType

func (d *CatPatch) MergeToType() map[string]interface{}

type CatQueryResult

type CatQueryResult struct {
	Data       []*Cat `json:"data"`
	Count      int    `json:"count"`
	TotalCount int    `json:"totalCount"`
}

type Company

type Company struct {
	ID              int        `json:"id" gorm:"primaryKey;autoIncrement;"`
	Name            string     `json:"name"`
	Description     *string    `json:"description,omitempty"`
	MotherCompanyID *int       `json:"motherCompanyID,omitempty"`
	MotherCompany   *Company   `json:"motherCompany,omitempty"`
	CreatedAt       *time.Time `json:"createdAt,omitempty"`
}

type CompanyFiltersInput

type CompanyFiltersInput struct {
	ID              *IDFilterInput         `json:"id,omitempty"`
	Name            *StringFilterInput     `json:"name,omitempty"`
	Description     *StringFilterInput     `json:"description,omitempty"`
	MotherCompanyID *IntFilterInput        `json:"motherCompanyID,omitempty"`
	MotherCompany   *CompanyFiltersInput   `json:"motherCompany,omitempty"`
	CreatedAt       *TimeFilterInput       `json:"createdAt,omitempty"`
	And             []*CompanyFiltersInput `json:"and,omitempty"`
	Or              []*CompanyFiltersInput `json:"or,omitempty"`
	Not             *CompanyFiltersInput   `json:"not,omitempty"`
}

func (*CompanyFiltersInput) ExtendsDatabaseQuery

func (d *CompanyFiltersInput) ExtendsDatabaseQuery(db *gorm.DB, alias string, deep bool, blackList map[string]struct{}) []runtimehelper.ConditionElement

func (*CompanyFiltersInput) PrimaryKeyName

func (d *CompanyFiltersInput) PrimaryKeyName() string

type CompanyInput

type CompanyInput struct {
	Name            string        `json:"name"`
	Description     *string       `json:"description,omitempty"`
	MotherCompanyID *int          `json:"motherCompanyID,omitempty"`
	MotherCompany   *CompanyInput `json:"motherCompany,omitempty"`
}

func CompanyInputFromMap added in v0.2.0

func CompanyInputFromMap(data map[string]interface{}) (CompanyInput, error)

func (*CompanyInput) MergeToType

func (d *CompanyInput) MergeToType() Company

type CompanyOrder

type CompanyOrder struct {
	Asc  *CompanyOrderable `json:"asc,omitempty"`
	Desc *CompanyOrderable `json:"desc,omitempty"`
}

type CompanyOrderable

type CompanyOrderable string
const (
	CompanyOrderableID              CompanyOrderable = "id"
	CompanyOrderableName            CompanyOrderable = "name"
	CompanyOrderableDescription     CompanyOrderable = "description"
	CompanyOrderableMotherCompanyID CompanyOrderable = "motherCompanyID"
)

func (CompanyOrderable) IsValid

func (e CompanyOrderable) IsValid() bool

func (CompanyOrderable) MarshalGQL

func (e CompanyOrderable) MarshalGQL(w io.Writer)

func (CompanyOrderable) String

func (e CompanyOrderable) String() string

func (*CompanyOrderable) UnmarshalGQL

func (e *CompanyOrderable) UnmarshalGQL(v interface{}) error

type CompanyPatch

type CompanyPatch struct {
	Name            *string       `json:"name,omitempty"`
	Description     *string       `json:"description,omitempty"`
	MotherCompanyID *int          `json:"motherCompanyID,omitempty"`
	MotherCompany   *CompanyPatch `json:"motherCompany,omitempty"`
}

func (*CompanyPatch) MergeToType

func (d *CompanyPatch) MergeToType() map[string]interface{}

type CompanyQueryResult

type CompanyQueryResult struct {
	Data       []*Company `json:"data"`
	Count      int        `json:"count"`
	TotalCount int        `json:"totalCount"`
}

type DeleteCatPayload

type DeleteCatPayload struct {
	Cat   *CatQueryResult `json:"cat"`
	Count int             `json:"count"`
	Msg   *string         `json:"msg,omitempty"`
}

type DeleteCompanyPayload

type DeleteCompanyPayload struct {
	Company *CompanyQueryResult `json:"company"`
	Count   int                 `json:"count"`
	Msg     *string             `json:"msg,omitempty"`
}

type DeleteSmartPhonePayload added in v0.1.5

type DeleteSmartPhonePayload struct {
	SmartPhone *SmartPhoneQueryResult `json:"smartPhone"`
	Count      int                    `json:"count"`
	Msg        *string                `json:"msg,omitempty"`
}

type DeleteTodoPayload

type DeleteTodoPayload struct {
	Todo  *TodoQueryResult `json:"todo"`
	Count int              `json:"count"`
	Msg   *string          `json:"msg,omitempty"`
}

type DeleteUserPayload

type DeleteUserPayload struct {
	User  *UserQueryResult `json:"user"`
	Count int              `json:"count"`
	Msg   *string          `json:"msg,omitempty"`
}

type IDFilterInput

type IDFilterInput struct {
	And     []*int         `json:"and,omitempty"`
	Or      []*int         `json:"or,omitempty"`
	Not     *IDFilterInput `json:"not,omitempty"`
	Eq      *int           `json:"eq,omitempty"`
	Ne      *int           `json:"ne,omitempty"`
	Null    *bool          `json:"null,omitempty"`
	NotNull *bool          `json:"notNull,omitempty"`
	In      []*int         `json:"in,omitempty"`
	Notin   []*int         `json:"notin,omitempty"`
}

func (*IDFilterInput) ExtendsDatabaseQuery

func (d *IDFilterInput) ExtendsDatabaseQuery(db *gorm.DB, fieldName string, deep bool, blackList map[string]struct{}) []runtimehelper.ConditionElement

type IntFilterBetween

type IntFilterBetween struct {
	Start int `json:"start"`
	End   int `json:"end"`
}

type IntFilterInput

type IntFilterInput struct {
	And     []*int            `json:"and,omitempty"`
	Or      []*int            `json:"or,omitempty"`
	Not     *IntFilterInput   `json:"not,omitempty"`
	Eq      *int              `json:"eq,omitempty"`
	Ne      *int              `json:"ne,omitempty"`
	Gt      *int              `json:"gt,omitempty"`
	Gte     *int              `json:"gte,omitempty"`
	Lt      *int              `json:"lt,omitempty"`
	Lte     *int              `json:"lte,omitempty"`
	Null    *bool             `json:"null,omitempty"`
	NotNull *bool             `json:"notNull,omitempty"`
	In      []*int            `json:"in,omitempty"`
	NotIn   []*int            `json:"notIn,omitempty"`
	Between *IntFilterBetween `json:"between,omitempty"`
}

func (*IntFilterInput) ExtendsDatabaseQuery

func (d *IntFilterInput) ExtendsDatabaseQuery(db *gorm.DB, fieldName string, deep bool, blackList map[string]struct{}) []runtimehelper.ConditionElement

type SQLCreateExtension

type SQLCreateExtension struct {
	Value        bool     `json:"value"`
	DirectiveExt []string `json:"directiveExt,omitempty"`
}

type SQLMutationParams

type SQLMutationParams struct {
	Add          *SQLCreateExtension `json:"add,omitempty"`
	Update       *SQLCreateExtension `json:"update,omitempty"`
	Delete       *SQLCreateExtension `json:"delete,omitempty"`
	DirectiveExt []string            `json:"directiveExt,omitempty"`
}

type SQLQueryParams

type SQLQueryParams struct {
	Get          *SQLCreateExtension `json:"get,omitempty"`
	Query        *SQLCreateExtension `json:"query,omitempty"`
	DirectiveExt []string            `json:"directiveExt,omitempty"`
}

type SmartPhone added in v0.1.5

type SmartPhone struct {
	ID          int    `json:"id" gorm:"primaryKey;autoIncrement;"`
	Brand       string `json:"brand"`
	Phonenumber string `json:"phonenumber"`
	UserID      int    `json:"userID"`
}

type SmartPhoneFiltersInput added in v0.1.5

type SmartPhoneFiltersInput struct {
	ID          *IDFilterInput            `json:"id,omitempty"`
	Brand       *StringFilterInput        `json:"brand,omitempty"`
	Phonenumber *StringFilterInput        `json:"phonenumber,omitempty"`
	UserID      *IDFilterInput            `json:"userID,omitempty"`
	And         []*SmartPhoneFiltersInput `json:"and,omitempty"`
	Or          []*SmartPhoneFiltersInput `json:"or,omitempty"`
	Not         *SmartPhoneFiltersInput   `json:"not,omitempty"`
}

func (*SmartPhoneFiltersInput) ExtendsDatabaseQuery added in v0.1.5

func (d *SmartPhoneFiltersInput) ExtendsDatabaseQuery(db *gorm.DB, alias string, deep bool, blackList map[string]struct{}) []runtimehelper.ConditionElement

func (*SmartPhoneFiltersInput) PrimaryKeyName added in v0.1.5

func (d *SmartPhoneFiltersInput) PrimaryKeyName() string

type SmartPhoneInput added in v0.1.5

type SmartPhoneInput struct {
	Brand       string `json:"brand"`
	Phonenumber string `json:"phonenumber"`
	UserID      int    `json:"userID"`
}

func SmartPhoneInputFromMap added in v0.2.0

func SmartPhoneInputFromMap(data map[string]interface{}) (SmartPhoneInput, error)

func (*SmartPhoneInput) MergeToType added in v0.1.5

func (d *SmartPhoneInput) MergeToType() SmartPhone

type SmartPhoneOrder added in v0.1.5

type SmartPhoneOrder struct {
	Asc  *SmartPhoneOrderable `json:"asc,omitempty"`
	Desc *SmartPhoneOrderable `json:"desc,omitempty"`
}

type SmartPhoneOrderable added in v0.1.5

type SmartPhoneOrderable string
const (
	SmartPhoneOrderableID          SmartPhoneOrderable = "id"
	SmartPhoneOrderableBrand       SmartPhoneOrderable = "brand"
	SmartPhoneOrderablePhonenumber SmartPhoneOrderable = "phonenumber"
	SmartPhoneOrderableUserID      SmartPhoneOrderable = "userID"
)

func (SmartPhoneOrderable) IsValid added in v0.1.5

func (e SmartPhoneOrderable) IsValid() bool

func (SmartPhoneOrderable) MarshalGQL added in v0.1.5

func (e SmartPhoneOrderable) MarshalGQL(w io.Writer)

func (SmartPhoneOrderable) String added in v0.1.5

func (e SmartPhoneOrderable) String() string

func (*SmartPhoneOrderable) UnmarshalGQL added in v0.1.5

func (e *SmartPhoneOrderable) UnmarshalGQL(v interface{}) error

type SmartPhonePatch added in v0.1.5

type SmartPhonePatch struct {
	Brand       *string `json:"brand,omitempty"`
	Phonenumber *string `json:"phonenumber,omitempty"`
	UserID      *int    `json:"userID,omitempty"`
}

func (*SmartPhonePatch) MergeToType added in v0.1.5

func (d *SmartPhonePatch) MergeToType() map[string]interface{}

type SmartPhoneQueryResult added in v0.1.5

type SmartPhoneQueryResult struct {
	Data       []*SmartPhone `json:"data"`
	Count      int           `json:"count"`
	TotalCount int           `json:"totalCount"`
}

type StringFilterInput

type StringFilterInput struct {
	And          []*string          `json:"and,omitempty"`
	Or           []*string          `json:"or,omitempty"`
	Not          *StringFilterInput `json:"not,omitempty"`
	Eq           *string            `json:"eq,omitempty"`
	Eqi          *string            `json:"eqi,omitempty"`
	Ne           *string            `json:"ne,omitempty"`
	StartsWith   *string            `json:"startsWith,omitempty"`
	EndsWith     *string            `json:"endsWith,omitempty"`
	Contains     *string            `json:"contains,omitempty"`
	NotContains  *string            `json:"notContains,omitempty"`
	Containsi    *string            `json:"containsi,omitempty"`
	NotContainsi *string            `json:"notContainsi,omitempty"`
	Null         *bool              `json:"null,omitempty"`
	NotNull      *bool              `json:"notNull,omitempty"`
	In           []*string          `json:"in,omitempty"`
	NotIn        []*string          `json:"notIn,omitempty"`
}

func (*StringFilterInput) ExtendsDatabaseQuery

func (d *StringFilterInput) ExtendsDatabaseQuery(db *gorm.DB, fieldName string, deep bool, blackList map[string]struct{}) []runtimehelper.ConditionElement

type TimeFilterBetween

type TimeFilterBetween struct {
	Start time.Time `json:"start"`
	End   time.Time `json:"end"`
}

type TimeFilterInput

type TimeFilterInput struct {
	And     []*time.Time       `json:"and,omitempty"`
	Or      []*time.Time       `json:"or,omitempty"`
	Not     *TimeFilterInput   `json:"not,omitempty"`
	Eq      *time.Time         `json:"eq,omitempty"`
	Ne      *time.Time         `json:"ne,omitempty"`
	Gt      *time.Time         `json:"gt,omitempty"`
	Gte     *time.Time         `json:"gte,omitempty"`
	Lt      *time.Time         `json:"lt,omitempty"`
	Lte     *time.Time         `json:"lte,omitempty"`
	Null    *bool              `json:"null,omitempty"`
	NotNull *bool              `json:"notNull,omitempty"`
	In      []*time.Time       `json:"in,omitempty"`
	NotIn   []*time.Time       `json:"notIn,omitempty"`
	Between *TimeFilterBetween `json:"between,omitempty"`
}

func (*TimeFilterInput) ExtendsDatabaseQuery

func (d *TimeFilterInput) ExtendsDatabaseQuery(db *gorm.DB, fieldName string, deep bool, blackList map[string]struct{}) []runtimehelper.ConditionElement

type Todo

type Todo struct {
	ID        int        `json:"id" gorm:"primaryKey;autoIncrement;"`
	Name      string     `json:"name"`
	Users     []*User    `json:"users" gorm:"many2many:todo_users;constraint:OnDelete:CASCADE;"`
	Owner     *User      `json:"owner"`
	OwnerID   int        `json:"ownerID"`
	CreatedAt *time.Time `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	Etype1    *TodoType  `json:"etype1,omitempty"`
	Etype5    TodoType   `json:"etype5"`
	Test123   *string    `json:"test123,omitempty"`
}

type TodoFiltersInput

type TodoFiltersInput struct {
	ID        *IDFilterInput      `json:"id,omitempty"`
	Name      *StringFilterInput  `json:"name,omitempty"`
	Users     *UserFiltersInput   `json:"users,omitempty"`
	Owner     *UserFiltersInput   `json:"owner,omitempty"`
	OwnerID   *IDFilterInput      `json:"ownerID,omitempty"`
	CreatedAt *TimeFilterInput    `json:"createdAt,omitempty"`
	UpdatedAt *TimeFilterInput    `json:"updatedAt,omitempty"`
	DeletedAt *TimeFilterInput    `json:"deletedAt,omitempty"`
	Etype1    *StringFilterInput  `json:"etype1,omitempty"`
	Etype5    *StringFilterInput  `json:"etype5,omitempty"`
	And       []*TodoFiltersInput `json:"and,omitempty"`
	Or        []*TodoFiltersInput `json:"or,omitempty"`
	Not       *TodoFiltersInput   `json:"not,omitempty"`
}

func (*TodoFiltersInput) ExtendsDatabaseQuery

func (d *TodoFiltersInput) ExtendsDatabaseQuery(db *gorm.DB, alias string, deep bool, blackList map[string]struct{}) []runtimehelper.ConditionElement

func (*TodoFiltersInput) PrimaryKeyName

func (d *TodoFiltersInput) PrimaryKeyName() string

type TodoInput

type TodoInput struct {
	Name    string    `json:"name"`
	Etype1  *TodoType `json:"etype1,omitempty"`
	Etype5  TodoType  `json:"etype5"`
	Test123 *string   `json:"test123,omitempty"`
}

func TodoInputFromMap added in v0.2.0

func TodoInputFromMap(data map[string]interface{}) (TodoInput, error)

func (*TodoInput) MergeToType

func (d *TodoInput) MergeToType() Todo

type TodoOrder

type TodoOrder struct {
	Asc  *TodoOrderable `json:"asc,omitempty"`
	Desc *TodoOrderable `json:"desc,omitempty"`
}

type TodoOrderable

type TodoOrderable string
const (
	TodoOrderableID      TodoOrderable = "id"
	TodoOrderableName    TodoOrderable = "name"
	TodoOrderableOwnerID TodoOrderable = "ownerID"
)

func (TodoOrderable) IsValid

func (e TodoOrderable) IsValid() bool

func (TodoOrderable) MarshalGQL

func (e TodoOrderable) MarshalGQL(w io.Writer)

func (TodoOrderable) String

func (e TodoOrderable) String() string

func (*TodoOrderable) UnmarshalGQL

func (e *TodoOrderable) UnmarshalGQL(v interface{}) error

type TodoPatch

type TodoPatch struct {
	Name    *string   `json:"name,omitempty"`
	Etype1  *TodoType `json:"etype1,omitempty"`
	Etype5  *TodoType `json:"etype5,omitempty"`
	Test123 *string   `json:"test123,omitempty"`
}

func (*TodoPatch) MergeToType

func (d *TodoPatch) MergeToType() map[string]interface{}

type TodoQueryResult

type TodoQueryResult struct {
	Data       []*Todo `json:"data"`
	Count      int     `json:"count"`
	TotalCount int     `json:"totalCount"`
}

type TodoType added in v0.1.4

type TodoType string
const (
	TodoTypeBug     TodoType = "Bug"
	TodoTypeFeature TodoType = "Feature"
)

func (TodoType) IsValid added in v0.1.4

func (e TodoType) IsValid() bool

func (TodoType) MarshalGQL added in v0.1.4

func (e TodoType) MarshalGQL(w io.Writer)

func (*TodoType) MergeToType added in v0.1.4

func (d *TodoType) MergeToType() TodoType

func (TodoType) String added in v0.1.4

func (e TodoType) String() string

func (*TodoType) UnmarshalGQL added in v0.1.4

func (e *TodoType) UnmarshalGQL(v interface{}) error

type UpdateCatInput

type UpdateCatInput struct {
	Filter *CatFiltersInput `json:"filter"`
	Set    *CatPatch        `json:"set"`
}

type UpdateCatPayload

type UpdateCatPayload struct {
	Cat      *CatQueryResult `json:"cat"`
	Count    int             `json:"count"`
	Affected []*Cat          `json:"affected"`
}

type UpdateCompanyInput

type UpdateCompanyInput struct {
	Filter *CompanyFiltersInput `json:"filter"`
	Set    *CompanyPatch        `json:"set"`
}

type UpdateCompanyPayload

type UpdateCompanyPayload struct {
	Company  *CompanyQueryResult `json:"company"`
	Count    int                 `json:"count"`
	Affected []*Company          `json:"affected"`
}

type UpdateSmartPhoneInput added in v0.1.5

type UpdateSmartPhoneInput struct {
	Filter *SmartPhoneFiltersInput `json:"filter"`
	Set    *SmartPhonePatch        `json:"set"`
}

type UpdateSmartPhonePayload added in v0.1.5

type UpdateSmartPhonePayload struct {
	SmartPhone *SmartPhoneQueryResult `json:"smartPhone"`
	Count      int                    `json:"count"`
	Affected   []*SmartPhone          `json:"affected"`
}

type UpdateTodoInput

type UpdateTodoInput struct {
	Filter *TodoFiltersInput `json:"filter"`
	Set    *TodoPatch        `json:"set"`
}

type UpdateTodoPayload

type UpdateTodoPayload struct {
	Todo     *TodoQueryResult `json:"todo"`
	Count    int              `json:"count"`
	Affected []*Todo          `json:"affected"`
}

type UpdateUserInput

type UpdateUserInput struct {
	Filter *UserFiltersInput `json:"filter"`
	Set    *UserPatch        `json:"set"`
}

type UpdateUserPayload

type UpdateUserPayload struct {
	User     *UserQueryResult `json:"user"`
	Count    int              `json:"count"`
	Affected []*User          `json:"affected"`
}

type User

type User struct {
	ID           int           `json:"id" gorm:"primaryKey;autoIncrement;"`
	Name         string        `json:"name"`
	CreatedAt    *time.Time    `json:"createdAt,omitempty"`
	UpdatedAt    *time.Time    `json:"updatedAt,omitempty"`
	DeletedAt    *time.Time    `json:"deletedAt,omitempty"`
	Cat          *Cat          `json:"cat,omitempty" gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;;"`
	CompanyID    *int          `json:"companyID,omitempty"`
	Company      *Company      `json:"company,omitempty"`
	SmartPhones  []*SmartPhone `json:"smartPhones,omitempty"`
	FavoritColor *string       `json:"favoritColor,omitempty"`
	Email        string        `json:"email"`
}

type UserFiltersInput

type UserFiltersInput struct {
	ID           *IDFilterInput          `json:"id,omitempty"`
	Name         *StringFilterInput      `json:"name,omitempty"`
	CreatedAt    *TimeFilterInput        `json:"createdAt,omitempty"`
	UpdatedAt    *TimeFilterInput        `json:"updatedAt,omitempty"`
	DeletedAt    *TimeFilterInput        `json:"deletedAt,omitempty"`
	Cat          *CatFiltersInput        `json:"cat,omitempty"`
	CompanyID    *IntFilterInput         `json:"companyID,omitempty"`
	Company      *CompanyFiltersInput    `json:"company,omitempty"`
	SmartPhones  *SmartPhoneFiltersInput `json:"smartPhones,omitempty"`
	FavoritColor *StringFilterInput      `json:"favoritColor,omitempty"`
	Email        *StringFilterInput      `json:"email,omitempty"`
	And          []*UserFiltersInput     `json:"and,omitempty"`
	Or           []*UserFiltersInput     `json:"or,omitempty"`
	Not          *UserFiltersInput       `json:"not,omitempty"`
}

func (*UserFiltersInput) ExtendsDatabaseQuery

func (d *UserFiltersInput) ExtendsDatabaseQuery(db *gorm.DB, alias string, deep bool, blackList map[string]struct{}) []runtimehelper.ConditionElement

func (*UserFiltersInput) PrimaryKeyName

func (d *UserFiltersInput) PrimaryKeyName() string

type UserInput

type UserInput struct {
	Name         string             `json:"name"`
	Cat          *CatInput          `json:"cat,omitempty"`
	CompanyID    *int               `json:"companyID,omitempty"`
	Company      *CompanyInput      `json:"company,omitempty"`
	SmartPhones  []*SmartPhoneInput `json:"smartPhones,omitempty"`
	FavoritColor *string            `json:"favoritColor,omitempty" validate:"omitempty,hexcolor|rgb|rgba"`
	Email        string             `json:"email" validate:"required,email"`
}

func UserInputFromMap added in v0.2.0

func UserInputFromMap(data map[string]interface{}) (UserInput, error)

func (*UserInput) MergeToType

func (d *UserInput) MergeToType() User

type UserOrder

type UserOrder struct {
	Asc  *UserOrderable `json:"asc,omitempty"`
	Desc *UserOrderable `json:"desc,omitempty"`
}

type UserOrderable

type UserOrderable string
const (
	UserOrderableID           UserOrderable = "id"
	UserOrderableName         UserOrderable = "name"
	UserOrderableCompanyID    UserOrderable = "companyID"
	UserOrderableFavoritColor UserOrderable = "favoritColor"
	UserOrderableEmail        UserOrderable = "email"
)

func (UserOrderable) IsValid

func (e UserOrderable) IsValid() bool

func (UserOrderable) MarshalGQL

func (e UserOrderable) MarshalGQL(w io.Writer)

func (UserOrderable) String

func (e UserOrderable) String() string

func (*UserOrderable) UnmarshalGQL

func (e *UserOrderable) UnmarshalGQL(v interface{}) error

type UserPatch

type UserPatch struct {
	Name         *string            `json:"name,omitempty"`
	Cat          *CatPatch          `json:"cat,omitempty"`
	CompanyID    *int               `json:"companyID,omitempty"`
	Company      *CompanyPatch      `json:"company,omitempty"`
	SmartPhones  []*SmartPhonePatch `json:"smartPhones,omitempty"`
	FavoritColor *string            `json:"favoritColor,omitempty" validate:"omitempty,hexcolor|rgb|rgba"`
	Email        *string            `json:"email,omitempty" validate:"required,email"`
}

func (*UserPatch) MergeToType

func (d *UserPatch) MergeToType() map[string]interface{}

type UserQueryResult

type UserQueryResult struct {
	Data       []*User `json:"data"`
	Count      int     `json:"count"`
	TotalCount int     `json:"totalCount"`
}

type UserRef2TodosInput

type UserRef2TodosInput struct {
	Filter *TodoFiltersInput `json:"filter"`
	Set    []int             `json:"set"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL