model

package
v0.0.0-...-273f3ac Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllGender = []Gender{
	GenderMale,
	GenderFemale,
}

Functions

This section is empty.

Types

type Company

type Company struct {
	ID             string `json:"id"`
	CompanyName    string `json:"companyName"`
	Representative string `json:"representative"`
	PhoneNumber    string `json:"phoneNumber"`
}

func (Company) IsNode

func (Company) IsNode()

type CompanyPagination

type CompanyPagination struct {
	PageInfo *PaginationInfo `json:"pageInfo"`
	Nodes    []*Company      `json:"nodes"`
}

func (CompanyPagination) IsPagination

func (CompanyPagination) IsPagination()

type CreateCompanyInput

type CreateCompanyInput struct {
	CompanyName    string `json:"companyName"`
	Representative string `json:"representative"`
	PhoneNumber    string `json:"phoneNumber"`
}

type CreateDepartmentInput

type CreateDepartmentInput struct {
	DepartmentName string `json:"departmentName"`
	Email          string `json:"email"`
}

type CreateEmployeeInput

type CreateEmployeeInput struct {
	Name          string `json:"name"`
	Gender        Gender `json:"gender"`
	Email         string `json:"email"`
	DependentsNum int    `json:"dependentsNum"`
	IsManager     bool   `json:"isManager"`
}

type Department

type Department struct {
	ID             string `json:"id"`
	DepartmentName string `json:"departmentName"`
	Email          string `json:"email"`
	CompanyID      string `json:"company"`
}

func (Department) IsNode

func (Department) IsNode()

type DepartmentPagination

type DepartmentPagination struct {
	PageInfo *PaginationInfo `json:"pageInfo"`
	Nodes    []*Department   `json:"nodes"`
}

func (DepartmentPagination) IsPagination

func (DepartmentPagination) IsPagination()

type Employee

type Employee struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	Gender        Gender `json:"gender"`
	Email         string `json:"email"`
	LatestLoginAt string `json:"latestLoginAt"`
	//  扶養家族の人数
	DependentsNum int `json:"dependentsNum"`
	//  管理職かどうか
	IsManager    bool   `json:"isManager"`
	DepartmentID string `json:"department"`
	CompanyID    string `json:"company"`
}

func (Employee) IsNode

func (Employee) IsNode()

type EmployeePagination

type EmployeePagination struct {
	PageInfo *PaginationInfo `json:"pageInfo"`
	Nodes    []*Employee     `json:"nodes"`
}

func (EmployeePagination) IsPagination

func (EmployeePagination) IsPagination()

type Gender

type Gender string
const (
	GenderMale   Gender = "Male"
	GenderFemale Gender = "Female"
)

func (Gender) IsValid

func (e Gender) IsValid() bool

func (Gender) MarshalGQL

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

func (Gender) String

func (e Gender) String() string

func (*Gender) UnmarshalGQL

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

type Node

type Node interface {
	IsNode()
}

type Pagination

type Pagination interface {
	IsPagination()
}

type PaginationInfo

type PaginationInfo struct {
	Page             int  `json:"page"`
	PaginationLength int  `json:"paginationLength"`
	HasNextPage      bool `json:"hasNextPage"`
	HasPreviousPage  bool `json:"hasPreviousPage"`
	Count            int  `json:"count"`
	TotalCount       int  `json:"totalCount"`
}

type UpdateCompanyInput

type UpdateCompanyInput struct {
	ID             string  `json:"id"`
	CompanyName    *string `json:"companyName"`
	Representative *string `json:"representative"`
	PhoneNumber    *string `json:"phoneNumber"`
}

type UpdateDepartmentInput

type UpdateDepartmentInput struct {
	ID             string  `json:"id"`
	DepartmentName *string `json:"departmentName"`
	Email          *string `json:"email"`
}

type UpdateEmployeeInput

type UpdateEmployeeInput struct {
	ID            string  `json:"id"`
	Name          *string `json:"name"`
	Gender        *Gender `json:"gender"`
	Email         *string `json:"email"`
	DependentsNum *int    `json:"dependentsNum"`
	IsManager     *bool   `json:"isManager"`
}

Jump to

Keyboard shortcuts

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