entity

package
v0.0.0-...-07e69b6 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 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 Group

type Group struct {
	ID           uint64    `gorm:"primaryKey"`
	UserID       uint64    `gorm:"not null;index"`
	SourceName   string    `gorm:"not null"`
	Name         string    `gorm:"not null"`
	LastUpdateAt time.Time `gorm:"not null"`
	CreatedAt    time.Time `gorm:"not null"`
	UpdatedAt    time.Time `gorm:"not null"`
	User         User      `gorm:"foreignKey:UserID"`
}

type Message

type Message struct {
	ID        uint64    `gorm:"primaryKey"`
	GroupID   uint64    `gorm:"not null;index"`
	MessageID uint64    `gorm:"not null"`
	Source    string    `gorm:"not null"`
	MessageAt time.Time `gorm:"not null"`
	CreatedAt time.Time `gorm:"not null"`
	UpdatedAt time.Time `gorm:"not null"`
	User      User      `gorm:"foreignKey:GroupID"`
}

type TelegramMessage

type TelegramMessage struct {
	Text string       `json:"text"`
	User TelegramUser `json:"from"`
}

type TelegramResult

type TelegramResult struct {
	Message TelegramMessage `json:"message"`
}

type TelegramUser

type TelegramUser struct {
	ID    uint64 `json:"id"`
	IsBot bool   `json:"is_bot"`
}

type User

type User struct {
	ID         uint64    `gorm:"primaryKey"`
	TelegramID uint64    `gorm:"not null;index"`
	CreatedAt  time.Time `gorm:"not null"`
	UpdatedAt  time.Time `gorm:"not null"`
}

type VkMessage

type VkMessage struct {
	ID      uint64 `json:"id"`
	OwnerID int64  `json:"owner_id"`
	Date    int64  `json:"date"`
}

type VkResponse

type VkResponse struct {
	VkResult `json:"response"`
}

type VkResult

type VkResult struct {
	Messages []VkMessage `json:"items"`
}

Jump to

Keyboard shortcuts

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