model

package
v0.0.0-...-295e33c Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ClientId    int64  `json:"clientId" db:"client_id"`
	OpenId      string `json:"openid"`
	GmtCreate   string `json:"gmtCreate" db:"gmt_create"`
	GmtModified string `json:"gmtModified" db:"gmt_modified"`
}

type Event

type Event struct {
	EventId           int64         `json:"eventId" db:"event_id"`
	ClientId          int64         `json:"clientId" db:"client_id"`
	Model             string        `json:"model"`
	Phone             string        `json:"phone"`
	QQ                string        `json:"qq"`
	ContactPreference string        `json:"contactPreference" db:"contact_preference" `
	Problem           string        `json:"problem" db:"problem"`
	MemberId          string        `json:"memberId" db:"member_id"`
	Member            *PublicMember `json:"member" db:"-"`
	ClosedBy          string        `json:"closedById" db:"closed_by"`
	ClosedByMember    *PublicMember `json:"closedBy" db:"-"`
	Status            string        `json:"status"`
	Logs              []EventLog    `json:"logs"`
	GmtCreate         string        `json:"gmtCreate" db:"gmt_create"`
	GmtModified       string        `json:"gmtModified" db:"gmt_modified"`
}

type EventAction

type EventAction struct {
	EventActionId int64  `json:"event_action_id"`
	Action        string `json:"action"`
}

type EventActionNotifyRequest

type EventActionNotifyRequest struct {
	Subject    string
	Model      string
	Problem    string
	ActorAlias string
	Link       string
	GmtCreate  string
}

type EventActionNotifyResponse

type EventActionNotifyResponse struct {
	Success bool
}

type EventActionRelation

type EventActionRelation struct {
	EventLogId    int64 `json:"event_log_id"`
	EventActionId int64 `json:"event_action_id"`
}

type EventEventStatusRelation

type EventEventStatusRelation struct {
	EventStatusId int64 `json:"event_status_id"`
	EventId       int64 `json:"eventId"`
}

type EventLog

type EventLog struct {
	EventLogId  int64  `json:"logId" db:"event_log_id"`
	EventId     int64  `json:"-" db:"-"`
	Description string `json:"description"`
	MemberId    string `json:"memberId" db:"member_id"`
	Action      string `json:"action"`
	GmtCreate   string `json:"gmtCreate" db:"gmt_create"`
}

type Identity

type Identity struct {
	Id     string
	Member Member
	Role   string
}

type Member

type Member struct {
	MemberId    string `json:"memberId" db:"member_id"`
	LogtoId     string `json:"logtoId" db:"logto_id"`
	Alias       string `json:"alias"`
	Password    string `json:"-"`
	Name        string `json:"name" `
	Section     string `json:"section" `
	Role        string `json:"role"`
	Profile     string `json:"profile"`
	Phone       string `json:"phone" `
	QQ          string `json:"qq" `
	Avatar      string `json:"avatar"`
	CreatedBy   string `json:"createdBy" db:"created_by"`
	GmtCreate   string `json:"gmtCreate" db:"gmt_create"`
	GmtModified string `json:"gmtModified" db:"gmt_modified"`
}

type MemberRoleRelation

type MemberRoleRelation struct {
	MemberId string `json:"memberId"`
	RoleId   int64  `json:"role_id"`
}

type NullMember

type NullMember struct {
	MemberId    sql.NullString `json:"memberId" db:"member_id"`
	Alias       sql.NullString `json:"alias"`
	Password    sql.NullString `json:"-"`
	Name        sql.NullString `json:"name" `
	Section     sql.NullString `json:"section" `
	Role        sql.NullString `json:"role"`
	Profile     sql.NullString `json:"profile"`
	Phone       sql.NullString `json:"phone" `
	QQ          sql.NullString `json:"qq" `
	Avatar      sql.NullString `json:"avatar"`
	CreatedBy   sql.NullString `json:"createdBy" db:"created_by"`
	GmtCreate   sql.NullString `json:"gmtCreate" db:"gmt_create"`
	GmtModified sql.NullString `json:"gmtModified" db:"gmt_modified"`
}

func (NullMember) Member

func (nm NullMember) Member() *Member

func (NullMember) PublicMember

func (nm NullMember) PublicMember() *PublicMember

type PublicEvent

type PublicEvent struct {
	EventId        int64         `json:"eventId" db:"event_id"`
	ClientId       int64         `json:"clientId" db:"client_id"`
	Model          string        `json:"model"`
	Problem        string        `json:"problem" db:"event_description"`
	MemberId       string        `json:"-" db:"member_id"`
	Member         *PublicMember `json:"member"`
	ClosedBy       string        `json:"-" db:"closed_by"`
	ClosedByMember *PublicMember `json:"closedBy"`
	Status         string        `json:"status"`
	Logs           []EventLog    `json:"logs"`
	GmtCreate      string        `json:"gmtCreate" db:"gmt_create"`
	GmtModified    string        `json:"gmtModified" db:"gmt_modified"`
}

func CreatePublicEvent

func CreatePublicEvent(e Event) PublicEvent

type PublicMember

type PublicMember struct {
	MemberId    string `json:"memberId" db:"member_id"`
	Alias       string `json:"alias"`
	Role        string `json:"role"`
	Profile     string `json:"profile"`
	Avatar      string `json:"avatar"`
	CreatedBy   string `json:"createdBy" db:"created_by"`
	GmtCreate   string `json:"gmtCreate" db:"gmt_create"`
	GmtModified string `json:"gmtModified" db:"gmt_modified"`
}

func CreatePublicMember

func CreatePublicMember(m Member) PublicMember

type Role

type Role struct {
	RoleId int64  `json:"role_id"`
	Role   string `json:"role"`
}

type Setting

type Setting struct {
	Setting string `json:"setting"`
}

type Status

type Status struct {
	StatusId int64  `json:"status_id"`
	Status   string `json:"status"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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