added token to request object, as well as created response object

This commit is contained in:
Josh Burman
2021-09-07 15:10:31 -04:00
parent c4fdd68af2
commit 8ac5d5efdb
5 changed files with 29 additions and 9 deletions

7
app/models/form.py Normal file
View File

@ -0,0 +1,7 @@
from pydantic import BaseModel
from typing import List
from models.item import Item
class Form(BaseModel):
items: List[Item]

View File

@ -7,7 +7,8 @@ from models.irt_model import IRTModel
from models.objective_function import ObjectiveFunction
from models.advanced_options import AdvancedOptions
class SolverContent(BaseModel):
class SolveRequest(BaseModel):
token: str
items: List[Item]
constraints: List[Constraint]
irt_model: IRTModel

View File

@ -0,0 +1,8 @@
from pydantic import BaseModel
from typing import List, Optional
from models.form import Form
class SolveResponse(BaseModel):
response_id: int
forms: List[Form]

View File

@ -1,8 +1,8 @@
from pydantic import BaseModel
class Targets(BaseModel):
neg_2_5: int
neg_1_5: int
neg_0_5: int
_0_5: int
_1: int
n_2_5: int
n_1_5: int
n_0_5: int
p_0_5: int
p_1: int