File size: 718 Bytes
fc76af0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from pydantic import BaseModel, EmailStr
from typing import Optional, List

class UserBase(BaseModel):
    username: str
    first_name: str
    last_name: str
    email: EmailStr
    age: Optional[int] = None
    preferences: Optional[dict] = None
    is_active: Optional[bool] = True


class UserCreate(UserBase):
    password: str


class UserUpdate(UserBase):
    password: Optional[str] = None

class User(UserBase):
    id: int

    class Config:
        orm_mode = True

class UserEmbeddingsBase(BaseModel):
    embeddings: List[float]

class UserEmbeddingsCreate(UserEmbeddingsBase):
    pass


class UserEmbeddings(UserEmbeddingsBase):
    id: int
    user_id: int

    class Config:
        orm_mode = True