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)

View File

@ -112,7 +112,7 @@ type Task struct {
// A timestamp when this task was last updated. You cannot change this value.
Updated time.Time `xorm:"updated not null" json:"updated"`
// BucketID is the ID of the kanban bucket this task belongs to.
// Deprecated: use the id via the separate entity.
BucketID int64 `xorm:"bigint null" json:"bucket_id"`
// The position of the task - any task project can be sorted as usual by this parameter.