models

package
v0.0.0-...-f990510 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivationToken

type ActivationToken struct {
	ID          int64     `json:"id"`
	UserID      int64     `json:"user_id"`
	Token       []byte    `json:"token"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
	IsProcessed int       `json:"is_processed"`
}

type EmailData

type EmailData struct {
	Recipient    string
	TemplateFile string
	Data         any
}

type Password

type Password struct {
	ID         int64     `json:"id"`
	Plaintext1 string    `json:"plaintext_1"`
	Plaintext2 string    `json:"plaintext_2"`
	Hash       []byte    `json:"-"`
	Salt       []byte    `json:"-"`
	UserID     int64     `json:"-"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
	Version    int       `json:"version"`
}

type PhoneNumber

type PhoneNumber struct {
	ID        int64     `json:"id"`
	Plaintext string    `json:"plaintext"`
	Hash      []byte    `json:"-"`
	UserID    int64     `json:"-"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Version   int       `json:"version"`
}

type Reminder

type Reminder struct {
	ID        int64       `json:"id"`
	Title     string      `json:"title"`
	Content   string      `json:"content"`
	UserID    int64       `json:"user_id"`
	DueDate   time.Time   `json:"due_date"`
	CreatedAt time.Time   `json:"created_at"`
	UpdatedAt time.Time   `json:"updated_at"`
	Schedule  []*Schedule `json:"schedule"`
	Version   int         `json:"version"`
}

type Schedule

type Schedule struct {
	ID           int64     `json:"id"`
	ReminderID   int64     `json:"reminder_id"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	DispatchTime time.Time `json:"dispatch_time"`
	Version      int       `json:"version"`
	IsProcessed  int       `json:"is_processed"`
}

type User

type User struct {
	ID          int64       `json:"id"`
	Email       string      `json:"email"`
	Password    Password    `json:"password"`
	PhoneNumber PhoneNumber `json:"phone_number"`
	CreatedAt   time.Time   `json:"created_at"`
	UpdatedAt   time.Time   `json:"updated_at"`
	Scope       int         `json:"scope"`
	IsActive    int         `json:"is_active"`
	Version     int         `json:"version"`
}

func (*User) PasswordsMatch

func (u *User) PasswordsMatch(password1, password2 string) bool

Jump to

Keyboard shortcuts

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