File size: 719 Bytes
b7a7f32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from typing import Optional  # noqa

from pydantic import BaseModel
from datetime import datetime


class FileBase(BaseModel):
    name:str
    path: str
    file_type: str
    uploaded_datetime: datetime = None
    description: str = None
    class_session_id: int


class FileCreate(FileBase):
    pass


class FileUpdate(FileBase):
    pass


class FileInDBBase(FileBase):
    id: Optional[int]

    class Config:
        orm_mode = True


class FileInDB(FileInDBBase):
    pass


class File(FileInDBBase):
    pass


class FileClassSessionReturn(BaseModel):
    name: str
    path: str
    file_type: str
    uploaded_datetime: datetime = None
    description: str = None

    class Config:
        orm_mode = True