1
0
mirror of synced 2024-11-25 05:06:03 +03:00
mg-transport-telegram/models.go
2018-05-23 17:40:17 +03:00

32 lines
881 B
Go

package main
import "time"
// Connection model
type Connection struct {
ID int `gorm:"primary_key"`
ClientID string `gorm:"client_id" json:"clientId,omitempty"`
APIKEY string `gorm:"api_key" json:"api_key,omitempty"`
APIURL string `gorm:"api_url" json:"api_url,omitempty"`
MGURL string `gorm:"mg_url" json:"mg_url,omitempty"`
MGToken string `gorm:"mg_token" json:"mg_token,omitempty"`
CreatedAt time.Time
UpdatedAt time.Time
Active bool `json:"active,omitempty"`
}
// Bot model
type Bot struct {
ID int `gorm:"primary_key"`
ClientID string `gorm:"client_id" json:"clientId,omitempty"`
Channel uint64 `json:"channel,omitempty"`
Token string `json:"token,omitempty"`
Name string `json:"name,omitempty"`
CreatedAt time.Time
UpdatedAt time.Time
Active bool `json:"active,omitempty"`
}
//Bots list
type Bots []Bot