feat: joj1 models
This commit is contained in:
parent
0d3aaa5f3f
commit
dd357cf39c
|
@ -1,3 +1,6 @@
|
||||||
|
from joj3_config_generator.models.joj1 import Case as Case
|
||||||
|
from joj3_config_generator.models.joj1 import JOJ1Config as JOJ1Config
|
||||||
|
from joj3_config_generator.models.joj1 import Language as Language
|
||||||
from joj3_config_generator.models.repo import Repo as Repo
|
from joj3_config_generator.models.repo import Repo as Repo
|
||||||
from joj3_config_generator.models.result import Cmd as Cmd
|
from joj3_config_generator.models.result import Cmd as Cmd
|
||||||
from joj3_config_generator.models.result import CmdFile as CmdFile
|
from joj3_config_generator.models.result import CmdFile as CmdFile
|
||||||
|
|
28
joj3_config_generator/models/joj1.py
Normal file
28
joj3_config_generator/models/joj1.py
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
|
class Language(BaseModel):
|
||||||
|
language: str
|
||||||
|
type: Optional[str] = None
|
||||||
|
compiler_file: Optional[str] = None
|
||||||
|
compiler_args: Optional[str] = None
|
||||||
|
code_file: Optional[str] = None
|
||||||
|
execute_file: Optional[str] = None
|
||||||
|
execute_args: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
|
class Case(BaseModel):
|
||||||
|
time: str = Field(default="1s")
|
||||||
|
memory: str = Field(default="32m")
|
||||||
|
score: int = Field(default=10)
|
||||||
|
input: str
|
||||||
|
output: str
|
||||||
|
execute_args: Optional[str] = None
|
||||||
|
category: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
|
class JOJ1Config(BaseModel):
|
||||||
|
languages: list[Language]
|
||||||
|
cases: list[Case]
|
Loading…
Reference in New Issue
Block a user