tg_group.go 1020 B

12345678910111213141516171819202122
  1. package entity
  2. // TgGroup Telegram 群组信息
  3. type TgGroup struct {
  4. MysqlBaseModel
  5. ChatId int64 `json:"chatId" gorm:"column:chat_id;unique;comment:'群组ID'"`
  6. ChatType string `json:"chatType" gorm:"column:chat_type;type:varchar(20);comment:'群组类型:group/supergroup'"`
  7. Title string `json:"title" gorm:"column:title;type:varchar(255);comment:'群组名称'"`
  8. Username string `json:"username" gorm:"column:username;type:varchar(255);comment:'群组用户名'"`
  9. Description string `json:"description" gorm:"column:description;type:text;comment:'群组描述'"`
  10. MemberCount int `json:"memberCount" gorm:"column:member_count;comment:'成员数量'"`
  11. Status int `json:"status" gorm:"column:status;default:1;comment:'状态:0-禁用,1-启用'"`
  12. BotJoinedAt int64 `json:"botJoinedAt" gorm:"column:bot_joined_at;comment:'Bot加入时间'"`
  13. }
  14. func (*TgGroup) TableName() string {
  15. return ModelPrefix + "tg_group"
  16. }
  17. func (*TgGroup) Comment() string {
  18. return "Telegram群组表"
  19. }