You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

v288.go 554B

1234567891011121314151617181920212223242526
  1. // Copyright 2024 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_22 //nolint
  4. import (
  5. "code.gitea.io/gitea/modules/timeutil"
  6. "xorm.io/xorm"
  7. )
  8. type Blocking struct {
  9. ID int64 `xorm:"pk autoincr"`
  10. BlockerID int64 `xorm:"UNIQUE(block)"`
  11. BlockeeID int64 `xorm:"UNIQUE(block)"`
  12. Note string
  13. CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
  14. }
  15. func (*Blocking) TableName() string {
  16. return "user_blocking"
  17. }
  18. func AddUserBlockingTable(x *xorm.Engine) error {
  19. return x.Sync(&Blocking{})
  20. }