entity

package module
v0.0.0-...-727b85e Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateUUID

func GenerateUUID() string

GenerateID generates a unique ID that can be used as an identifier for an entity.

Types

type Advert struct {
	AdvertId   int64  `db:"pk,advert_id"`
	UserId     int64  `db:"user_id"`
	CategoryId int64  `db:"category_id"`
	Title      string `db:"title"`
	Nanopost   string `db:"nanopost"`
	Price      int    `db:"price"`
	Currency   string `db:"currency"`
	Picture1   string `db:"picture1"`
	Picture2   string `db:"picture2"`
	Picture3   string `db:"picture3"`
	Picture4   string `db:"picture4"`
	// Picture5    string  `db:"picture5"`
	// Picture6    string  `db:"picture6"`
	ModeratorId int64  `db:"moderator_id"`
	Created     string `db:"created"`
	Active      int    `db:"active"`
}

Advert represents an album record.

type Category

type Category struct {
	CategoryId int64  `db:"pk,category_id"`
	ParentId   int64  `db:"parent_id"`
	Name       string `db:"name"`
	Slug       string `db:"slug"`
	IsActive   int    `db:"is_active"`
}

Category represents an category record.

type CategoryPath

type CategoryPath struct {
	CategoryId int64  `db:"pk,category_id"`
	Path       string `db:path`
}

type Message

type Message struct {
	MessageId   int64  `db:"pk,message_id"`
	SenderId    int64  `db:"sender_id"`
	ReceiverId  int64  `db:"receiver_id"`
	Content     string `db:"content"`
	Sended      string `db:"sended"`
	Readed      string `db:"readed"`
	ModeratorId int64  `db:"moderator_id"`
}

Message represents an message table record.

type User

type User struct {
	UserId       int64  `db:"user_id"`
	Name         string `db:"name"`
	Email        string `db:"email"`
	Tel          string `db:"tel"`
	Impp         string `db:"impp"`
	Authkey      string `db:"authkey"`
	Passhash     string `db:"passhash"`
	Approvetoken string `db:"approvetoken"`
	Picture      string `db:"picture"`
	Created      string `db:"created"`
	Lastlogin    string `db:"lastlogin"`
	Roles        string `db:"roles"`
	Notes        string `db:"notes"`
}

User represents a user.

func (User) GetID

func (u User) GetID() int64

GetID returns the user ID.

func (User) GetName

func (u User) GetName() string

GetName returns the user name.

Jump to

Keyboard shortcuts

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