mirror of
https://github.com/a-mayb3/Kanban_clone_backend.git
synced 2026-03-21 10:05:38 +01:00
24 lines
489 B
Python
24 lines
489 B
Python
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]
|