model

package
v0.0.0-...-52a3571 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AnnouncementInput

type AnnouncementInput struct {
	Title   string `json:"title"`
	UserID  int64  `json:"userId"`
	Content string `json:"content"`
}

type AnnouncementInputWithID

type AnnouncementInputWithID struct {
	AnnouncementID int64  `json:"announcementId"`
	Title          string `json:"title"`
	UserID         int64  `json:"userId"`
	Content        string `json:"content"`
}

type Invitation

type Invitation struct {
	ID      int64     `json:"id"`
	Invitee *ent.User `json:"invitee"`
	Inviter *ent.User `json:"inviter"`
	TeamID  int64     `json:"teamId"`
}

type JudgeReply

type JudgeReply struct {
	ID           int64     `json:"id"`
	User         *ent.User `json:"user"`
	JudgeTime    time.Time `json:"judgeTime"`
	FinishedTime time.Time `json:"finishedTime"`
	TimeCost     int64     `json:"timeCost"`
	MemoryCost   int64     `json:"memoryCost"`
	Status       int64     `json:"status"`
}

type JudgeRequest

type JudgeRequest struct {
	ID          int64        `json:"id"`
	User        *ent.User    `json:"user"`
	CreatedTime time.Time    `json:"createdTime"`
	SourceCode  string       `json:"source_code"`
	Problem     *ent.Problem `json:"problem"`
}

type JudgeRequestInput

type JudgeRequestInput struct {
	UserID        int64  `json:"userId"`
	ProblemID     int64  `json:"problemId"`
	JudgeRecordID int64  `json:"judgeRecordId"`
	Code          string `json:"code"`
}

type NewTodo

type NewTodo struct {
	Text   string `json:"text"`
	UserID string `json:"userId"`
}

type PingInput

type PingInput struct {
	Msg string `json:"msg"`
}

type Privilege

type Privilege struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

type ProblemFilter

type ProblemFilter struct {
	Tags []*int64 `json:"tags"`
}

type ProblemInput

type ProblemInput struct {
	Title   string   `json:"title"`
	Content string   `json:"content"`
	Author  int64    `json:"author"`
	Tags    []*int64 `json:"tags"`
}

type ProblemInputWithID

type ProblemInputWithID struct {
	ID      int64    `json:"id"`
	Title   string   `json:"title"`
	Content string   `json:"content"`
	Author  int64    `json:"author"`
	Tags    []*int64 `json:"tags"`
}

type Reply

type Reply struct {
	Code    int64       `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"Data"`
}

type Role

type Role struct {
	ID         int64        `json:"id"`
	Name       string       `json:"name"`
	Scope      *RoleScope   `json:"scope"`
	Privileges []*Privilege `json:"privileges"`
}

type RoleScope

type RoleScope string
const (
	RoleScopeGlobal RoleScope = "GLOBAL"
	RoleScopeTeam   RoleScope = "TEAM"
)

func (RoleScope) IsValid

func (e RoleScope) IsValid() bool

func (RoleScope) MarshalGQL

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

func (RoleScope) String

func (e RoleScope) String() string

func (*RoleScope) UnmarshalGQL

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

type RoleType

type RoleType string
const (
	RoleTypeAdmin      RoleType = "ADMIN"
	RoleTypeTeamOwner  RoleType = "TEAM_OWNER"
	RoleTypeTeamAdmin  RoleType = "TEAM_ADMIN"
	RoleTypeTeamMember RoleType = "TEAM_MEMBER"
	RoleTypeUser       RoleType = "USER"
)

func (RoleType) IsValid

func (e RoleType) IsValid() bool

func (RoleType) MarshalGQL

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

func (RoleType) String

func (e RoleType) String() string

func (*RoleType) UnmarshalGQL

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

type Task

type Task struct {
	ID         int64       `json:"id"`
	Name       string      `json:"name"`
	TaskType   *TaskType   `json:"taskType"`
	Content    *string     `json:"content"`
	Assignees  []*ent.User `json:"assignees"`
	Status     TaskStatus  `json:"status"`
	ParentList *TaskList   `json:"parentList"`
}

type TaskList

type TaskList struct {
	ID           int64       `json:"id"`
	Name         string      `json:"name"`
	Assignees    []*ent.User `json:"assignees"`
	Deadline     time.Time   `json:"deadline"`
	Status       TaskStatus  `json:"status"`
	RelyTaskList *TaskList   `json:"relyTaskList"`
	Tasks        []*Task     `json:"tasks"`
}

type TaskStatus

type TaskStatus string
const (
	TaskStatusExpired  TaskStatus = "Expired"
	TaskStatusFinished TaskStatus = "Finished"
	TaskStatusWaiting  TaskStatus = "Waiting"
	TaskStatusCanceled TaskStatus = "Canceled"
)

func (TaskStatus) IsValid

func (e TaskStatus) IsValid() bool

func (TaskStatus) MarshalGQL

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

func (TaskStatus) String

func (e TaskStatus) String() string

func (*TaskStatus) UnmarshalGQL

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

type TaskType

type TaskType string
const (
	TaskTypeProblem    TaskType = "Problem"
	TaskTypeCustom     TaskType = "Custom"
	TaskTypeMeeting    TaskType = "Meeting"
	TaskTypeSubmission TaskType = "Submission"
)

func (TaskType) IsValid

func (e TaskType) IsValid() bool

func (TaskType) MarshalGQL

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

func (TaskType) String

func (e TaskType) String() string

func (*TaskType) UnmarshalGQL

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

type TeamInput

type TeamInput struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	OperatorID  int64    `json:"operatorId"`
	Members     []*int64 `json:"members"`
	Admins      []*int64 `json:"admins"`
}

type TeamInputWithID

type TeamInputWithID struct {
	TeamID      int64  `json:"teamId"`
	Name        string `json:"name"`
	Description string `json:"description"`
	OperatorID  int64  `json:"operatorId"`
}

type UserInput

type UserInput struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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