2024-05-07 21:49:09 +03:00
|
|
|
package model
|
|
|
|
|
|
|
|
type User struct {
|
|
|
|
ID uint64 `gorm:"primary_key;auto_increment" json:"id"`
|
2024-05-09 17:42:42 +03:00
|
|
|
TelegramID int64 `gorm:"not null" json:"telegram_id"`
|
2024-05-09 20:48:59 +03:00
|
|
|
ChatID int64 `gorm:"not null" json:"chat_id"`
|
|
|
|
Language string `json:"language"`
|
2024-05-07 21:49:09 +03:00
|
|
|
Chats []Chat `gorm:"foreignKey:UserID" json:"chats"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (User) TableName() string {
|
|
|
|
return "user"
|
|
|
|
}
|