1
0

feat(views)!: decouple bucket <-> task relationship

This commit is contained in:
kolaente
2024-03-15 11:28:07 +01:00
parent 9cf84646a1
commit a13276e28e
3 changed files with 189 additions and 1 deletions

View File

@ -70,6 +70,11 @@ func (b *Bucket) TableName() string {
return "buckets"
}
type TaskBucket struct {
BucketID int64 `xorm:"bigint not null index"`
TaskID int64 `xorm:"bigint not null index"`
}
func getBucketByID(s *xorm.Session, id int64) (b *Bucket, err error) {
b = &Bucket{}
exists, err := s.Where("id = ?", id).Get(b)