mirror of
https://github.com/a-mayb3/Kanban_clone_backend.git
synced 2026-03-21 18:15:37 +01:00
Created basic classes for tasks, projects, and task statuses
This commit is contained in:
parent
d76caf491c
commit
8b91f3441f
1 changed files with 24 additions and 0 deletions
24
main.py
Normal file
24
main.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
from fastapi import FastAPI, HTTPException, Depends
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Annotated
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
class TaskStatus():
|
||||
PENDING = "pending"
|
||||
IN_PROGRESS = "in_progress"
|
||||
COMPLETED = "completed"
|
||||
FAILED = "failed"
|
||||
STASHED = "stashed"
|
||||
|
||||
class TaskBase(BaseModel):
|
||||
id: int
|
||||
title: str
|
||||
description: str
|
||||
status: TaskStatus
|
||||
|
||||
class ProjectBase(BaseModel):
|
||||
id: int
|
||||
name: str
|
||||
description: str
|
||||
tasks: List[TaskBase]
|
||||
Loading…
Add table
Add a link
Reference in a new issue