gitea源码

v186.go 586B

1234567891011121314151617181920212223242526
  1. // Copyright 2021 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_15
  4. import (
  5. "code.gitea.io/gitea/modules/timeutil"
  6. "xorm.io/xorm"
  7. )
  8. func CreateProtectedTagTable(x *xorm.Engine) error {
  9. type ProtectedTag struct {
  10. ID int64 `xorm:"pk autoincr"`
  11. RepoID int64
  12. NamePattern string
  13. AllowlistUserIDs []int64 `xorm:"JSON TEXT"`
  14. AllowlistTeamIDs []int64 `xorm:"JSON TEXT"`
  15. CreatedUnix timeutil.TimeStamp `xorm:"created"`
  16. UpdatedUnix timeutil.TimeStamp `xorm:"updated"`
  17. }
  18. return x.Sync(new(ProtectedTag))
  19. }