Try out taskmaster at taskmaster.studio!
The application is a simple task manager. A user can:
- create tasks and create sub-tasks,
- assign tasks to other users, and comment on them,
- upload pictures to a task,
- create tags and assign them to tasks.
- create locations and assign them to tasks
- participate in tasks
TaskMaster has the following entities:
The users table includes:
id: UUID, PRIMARY KEYfirst_name: VARCHAR, NULL: FALSElast_name: VARCHAR, NULL: FALSEnick_name: CITEXT, UNIQUEemail: CITEXT, UNIQUE, NULL: FALSEhashed_password: VARCHAR (redacted), NULL: FALSEcurrent_password: VARCHAR (virtual field, redacted)confirmed_at: TIMESTAMP without time zonelast_login_at: TIMESTAMP without time zoneinserted_at: TIMESTAMP without time zone, NOT NULLupdated_at: TIMESTAMP without time zone, NOT NULLUNIQUE(email)UNIQUE(nick_name)avatar_id: VARCHAR, FOREIGN KEY referencingavatars(id)
Users can sign up and log in to the system. Users can have many tasks, comments, pictures, and avatars. Users can have many tags and locations. Users can have many participations. Users can have many task assignments.
The avatars table includes:
id: UUID, PRIMARY KEYpath: VARCHARuser_id: UUID, FOREIGN KEY referencingusers(id), NULL: FALSEis_active: BOOLEAN DEFAULT falseinserted_at: TIMESTAMP without time zone, NOT NULLupdated_at: TIMESTAMP without time zone, NOT NULL
Users can upload many avatar files. An avatar file can be assigned to only one user.
The user_tokens table includes:
id: UUID, PRIMARY KEYuser_id: UUID, FOREIGN KEY referencingusers(id), NULL: FALSEtoken: BINARY, NULL: FALSEcontext: TEXT, NULL: FALSEsent_to: TEXTinserted_at: TIMESTAMP without time zone, NOT NULL
The tasks table includes:
id: UUID, PRIMARY KEYtitle: VARCHAR, NULL: FALSEdescription: TEXTdue_date: DATEstatus: ENUM('open', 'progressing', 'completed'), DEFAULT 'open', NULL: FALSEduration: INTEGERcompleted_at: TIMESTAMP without time zonepriority: INTEGERindoor: BOOLEANcreated_by: UUID, FOREIGN KEY referencingusers(id), NULL: FALSEparent_task_id: UUID, FOREIGN KEY referencingtasks(id)inserted_at: TIMESTAMP without time zone, NOT NULLupdated_at: TIMESTAMP without time zone, NOT NULLUNIQUE(title)
Users can add tasks to the system. A task can have a parent task. A task can have multiple sub-tasks. A task can have multiple tags. A task can have multiple locations. A task can have multiple pictures. A task can have multiple comments. A task can have multiple participations. It also has a priority field that can be used to sort tasks and a duration field that can be used to estimate the time needed to complete the task. It also has a status field that can be used to track the progress of the task. The status can be open, progressing, or completed. The completed_at field is used to store the date and time when the task was completed. It also has a due_date field that can be used to set the deadline for the task. It also has a created_by field that references the user who created the task. It checks if it's an indoor or outdoor task.
The task_participations table includes:
id: UUID, PRIMARY KEYuser_id: UUID, FOREIGN KEY referencingusers(id), NULL: FALSEtask_id: UUID, FOREIGN KEY referencingtasks(id), NULL: FALSEinserted_at: TIMESTAMP without time zone, NOT NULLupdated_at: TIMESTAMP without time zone, NOT NULLUNIQUE(user_id, task_id)
A user can participate in a task. A user can be assigned to multiple tasks. A task can have multiple participants.
The pictures table includes:
id: UUID, PRIMARY KEYpath: VARCHARtype: ENUM('before', 'after')user_id: UUID, FOREIGN KEY referencingusers(id), NULL: FALSEtask_id: UUID, FOREIGN KEY referencingtasks(id), NULL: FALSEinserted_at: TIMESTAMP without time zone, NOT NULLupdated_at: TIMESTAMP without time zone, NOT NULL
Users can upload pictures to a task. A picture can be of type before or after.
The comments table includes:
id: UUID, PRIMARY KEYcontent: TEXT, NULL: FALSEcreated_by: UUID, FOREIGN KEY referencingusers(id), NULL: FALSEtask_id: UUID, FOREIGN KEY referencingtasks(id), NULL: FALSEinserted_at: TIMESTAMP without time zone, NOT NULLupdated_at: TIMESTAMP without time zone, NOT NULL
Users can comment on a task. A task can have multiple comments.
The tags table includes:
id: UUID, PRIMARY KEYname: VARCHAR, NULL: FALSEdescription: TEXTcolour: VARCHAR(7), NULL: FALSEcreated_by: UUID, FOREIGN KEY referencingusers(id), NULL: FALSEinserted_at: TIMESTAMP without time zone, NOT NULLupdated_at: TIMESTAMP without time zone, NOT NULLUNIQUE(name)
Users can create tags that are visible and usable by all users in the system.
The task_tags table includes:
id: UUID, PRIMARY KEYtag_id: UUID, FOREIGN KEY referencingtags(id), NULL: FALSEtask_id: UUID, FOREIGN KEY referencingtasks(id), NULL: FALSEinserted_at: TIMESTAMP without time zone, NOT NULLupdated_at: TIMESTAMP without time zone, NOT NULLUNIQUE(tag_id, task_id)
A task can have multiple tags. A tag can be assigned to multiple tasks.