package entities import ( "time" "go.mongodb.org/mongo-driver/v2/bson" ) const MaxTaskDepth = 2 // Task represents a task and supports up to 3 nesting levels (0,1,2). type Task struct { ID bson.ObjectID `bson:"_id,omitempty"` SpaceID bson.ObjectID `bson:"space_id"` Title string `bson:"title"` Description string `bson:"description"` TaskListID bson.ObjectID `bson:"task_list_id"` StatusID bson.ObjectID `bson:"status_id"` ParentTaskID *bson.ObjectID `bson:"parent_task_id,omitempty"` Depth int `bson:"depth"` NoteLinks []bson.ObjectID `bson:"note_links"` CreatedBy bson.ObjectID `bson:"created_by"` UpdatedBy bson.ObjectID `bson:"updated_by"` CreatedAt time.Time `bson:"created_at"` UpdatedAt time.Time `bson:"updated_at"` } // TaskStatus defines the ordered linear status progression for a space. type TaskStatus struct { ID bson.ObjectID `bson:"_id,omitempty"` SpaceID bson.ObjectID `bson:"space_id"` Name string `bson:"name"` Color string `bson:"color,omitempty"` Order int `bson:"order"` CreatedAt time.Time `bson:"created_at"` UpdatedAt time.Time `bson:"updated_at"` } // TaskList groups tasks under a named list that can be attached to a category. type TaskList struct { ID bson.ObjectID `bson:"_id,omitempty"` SpaceID bson.ObjectID `bson:"space_id"` CategoryID *bson.ObjectID `bson:"category_id,omitempty"` Name string `bson:"name"` Description string `bson:"description,omitempty"` CreatedBy bson.ObjectID `bson:"created_by"` UpdatedBy bson.ObjectID `bson:"updated_by"` CreatedAt time.Time `bson:"created_at"` UpdatedAt time.Time `bson:"updated_at"` }