swadhinbiswas 4thr · 2/4/2024
eb11588
35 lines · 982 Bytes
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
from typing import Optional, List
from uuid import UUID
from pydantic import BaseModel,EmailStr,Field
from models.plagermodel import Plager

class PlagerBase(BaseModel):
    file_name: str=Field(...,description="Name of the file")
    title: str=Field(...,description="Title of the file",max_length=100)
    owner: List[str]=Field(...,description="Owner of the file")
    plagarism: str=Field(...,description="Plagarism of the file")
    description: str=Field(...,description="Description of the file")
    word_file_link: Optional[str]=Field(...,description="Link to the file")
    plagarism_persent: Optional[str]=Field(...,description="Plagarism persent of the file")
    
class OutPlager(PlagerBase):
    file_name: str
    title: str
    owner: List[str]
    plagarism: str
    description: str
    plagur: bool
    plagarism_persent: str
    word_file_link: str
    
    
    
    
    
class UpdatePlager(BaseModel):
    file_name: Optional[str]
    title: Optional[str]