From addb9aab0c825279b54e7f68175f21a6462a3540 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 8 Mar 2020 20:58:35 +0100 Subject: [PATCH] Add is archived property to lists and namespaces Signed-off-by: kolaente --- pkg/models/list.go | 3 +++ pkg/models/namespace.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pkg/models/list.go b/pkg/models/list.go index 9ddde6a04..17b7656e9 100644 --- a/pkg/models/list.go +++ b/pkg/models/list.go @@ -43,6 +43,9 @@ type List struct { // Deprecated: you should use the dedicated task list endpoint because it has support for pagination and filtering Tasks []*Task `xorm:"-" json:"-"` + // Whether or not a list is archived. + IsArchived bool `xorm:"not null default false" json:"is_archived"` + // A timestamp when this list was created. You cannot change this value. Created timeutil.TimeStamp `xorm:"created not null" json:"created"` // A timestamp when this list was last updated. You cannot change this value. diff --git a/pkg/models/namespace.go b/pkg/models/namespace.go index 1bcf9eab9..80f5011ee 100644 --- a/pkg/models/namespace.go +++ b/pkg/models/namespace.go @@ -35,6 +35,9 @@ type Namespace struct { Description string `xorm:"longtext null" json:"description"` OwnerID int64 `xorm:"int(11) not null INDEX" json:"-"` + // Whether or not a namespace is archived. + IsArchived bool `xorm:"not null default false" json:"is_archived"` + // The user who owns this namespace Owner *user.User `xorm:"-" json:"owner" valid:"-"`