models

package
v0.0.0-...-dcf0478 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package models contain entities that are essential for the app.

Package models contain entities that are essential for the app.

Package models contain entities that are essential for the app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Language

type Language uint

Language shows in which language a user sees menus and messages.

const (
	En Language
	Fa
)

func (Language) String

func (l Language) String() string

type Mode

type Mode uint

Mode shows whether the application is in development mode or production mode.

const (
	Development Mode
	Production
)

type User

type User struct {
	ID         int64     `bson:"id"`
	TelegramID int64     `bson:"telegram_id,omitempty"`
	Username   string    `bson:"username"`
	FirstName  string    `bson:"firstname,omitempty"`
	LastName   string    `bson:"lastname"`
	JoinedAt   time.Time `bson:"joined_at,omitempty"`
	Language   Language  `bson:"language"`
}

User represents user table structure in a database.

Jump to

Keyboard shortcuts

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