schema

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotiSchema

type NotiSchema struct {
	Type    string `json:"type" portal:"const:vip"`
	ID      string `json:"id,omitempty"`
	Title   string `json:"title,omitempty"`
	Content string `json:"content,omitempty"`
}

type Schedule added in v0.12.0

type Schedule struct {
	At          time.Time
	Description string
}

type TaskSchema

type TaskSchema struct {
	ID                  string             `json:"id,omitempty"`
	Title               string             `json:"title,omitempty"`
	Description         string             `json:"description,omitempty" portal:"meth:GetDescription;async"`
	Description1        string             `json:"description1,omitempty" portal:"meth:GetDescription;async"`
	Description2        string             `json:"description2,omitempty" portal:"meth:GetDescription;async"`
	Description3        string             `json:"description3,omitempty" portal:"meth:GetDescription;async"`
	User                *UserSchema        `json:"user,omitempty" portal:"nested"`
	SimpleUser          *UserSchema        `json:"simple_user,omitempty" portal:"nested;only:Name;attr:User"`
	Unknown             string             `json:"unknown"`
	UsersWithDefault    []*UserSchema      `json:"users_with_default" portal:"nested;default:AUTO_INIT"`
	UserWithDefault     *UserSchema        `json:"user_with_default" portal:"nested;default:AUTO_INIT"`
	LowerString         *field.LowerString `json:"lower_string,omitempty" portal:"meth:GetDescription"`
	UpperString         *field.UpperString `json:"upper_string,omitempty" portal:"meth:GetDescription"`
	ScheduleAt          *field.Timestamp   `json:"schedule_at,omitempty" portal:"meth:FetchSchedule.At"`
	ScheduleDescription *string            `json:"schedule_description,omitempty" portal:"meth:FetchSchedule.Description"`
}

func (*TaskSchema) FetchSchedule added in v0.12.0

func (ts *TaskSchema) FetchSchedule(model *model.TaskModel) *Schedule

func (*TaskSchema) GetDescription

func (ts *TaskSchema) GetDescription(model *model.TaskModel) (string, error)

type UserSchema

type UserSchema struct {
	ID                   string           `json:"id,omitempty"`
	Tag                  *string          `json:"tag,omitempty"`
	Name                 string           `json:"name,omitempty" portal:"attr:Fullname"`
	Notifications        []*NotiSchema    `json:"notifications,omitempty" portal:"nested"`
	AnotherNotifications []*NotiSchema    `json:"another_notifications,omitempty" portal:"nested;attr:Notifications"`
	CreatedAt            *field.Timestamp `json:"created_at,omitempty"`
	UpdatedAt            *field.Timestamp `json:"updated_at,omitempty"`
}

Jump to

Keyboard shortcuts

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