model

package
v0.0.0-...-f70499c Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DirectionIn  = "in"
	DirectionOut = "out"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	UUID               string
	Name               string
	Messages           []Message
	IsCurrentUserAdmin bool
	InvitationURL      string
	CreatedAt          time.Time
	UpdatedAt          *time.Time
}

type ChannelRole

type ChannelRole = string
const (
	RoleAdmin ChannelRole = "admin"
)

type Direction

type Direction = string

type FieldVerification

type FieldVerification struct {
	UUID       string
	Code       string
	UserUUID   *string
	FieldName  string
	FieldValue string
	CreatedAt  time.Time
}

type Member

type Member struct {
	ChannelUUID string
	UserUUID    string
	Role        ChannelRole
	CreatedAt   time.Time
	UpdatedAt   *time.Time
}

type Message

type Message struct {
	UUID        string
	ChannelUUID string
	Sender      User
	Content     string `json:"content"`
	Direction   Direction
	Version     uint32
	SentAt      time.Time
	DeletedAt   *time.Time
	UpdatedAt   *time.Time
}

type PasswordCredential

type PasswordCredential struct {
	UserUUID       string
	PasswordHash   string
	CreatedAt      time.Time
	UpdatedAt      *time.Time
	LastAssertedAt *time.Time
}

type RegisterRequest

type RegisterRequest struct {
	VerificationUUID string
	Code             string
	Name             string
	PlainPassword    string
}

type Session

type Session struct {
	ID         string
	UserUUID   string
	CreatedAt  time.Time
	LastSeenAt *time.Time
}

type User

type User struct {
	UUID            string
	Name            string
	Email           string
	AvatarUrl       string
	EmailVerifiedAt *time.Time
	CreatedAt       time.Time
	LastLoginAt     *time.Time
	DeactivatedAt   *time.Time
	UpdatedAt       *time.Time
}

Jump to

Keyboard shortcuts

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