<reponame>daniel3108-pl/FastApi_NoteStoringAPI
from fastapi import Query, Path, Body
from pydantic import BaseModel, Field
from typing import *
from datetime import datetime


class NoteResource(BaseModel):
    id: int = Field(None)
    title: str = Query(..., min_length=4, max_length=50)
    content: Optional[str] = ""
    created_at: datetime = datetime.now()

class NoteResourceToDB(NoteResource):
    author: int
