sls.py 1.04 KB
Newer Older
Wei Shoulin's avatar
Wei Shoulin committed
1
import dataclasses
Wei Shoulin's avatar
Wei Shoulin committed
2
3
4
from typing import Dict
from .common import BaseModel, default_field

Wei Shoulin's avatar
Wei Shoulin committed
5
@dataclasses.dataclass
Wei Shoulin's avatar
Wei Shoulin committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class Level1Record(BaseModel):
    id: int = 0
    level0_id : str = ""
    data_type: str=""
    prc_params: str=""
    filename : str=""
    file_path: str=""
    qc1_status: int = 0
    qc1_time: str=""
    prc_status: int = 0
    prc_time: str=""
    create_time: str=""
    pipeline_id: str=""
    refs: Dict[str,int] = default_field({})
Wei Shoulin's avatar
Wei Shoulin committed
20
    
Wei Shoulin's avatar
Wei Shoulin committed
21
@dataclasses.dataclass
Wei Shoulin's avatar
Wei Shoulin committed
22
23
class Level2Spectra(BaseModel):
    id: int = 0
Wei Shoulin's avatar
Wei Shoulin committed
24
    level0_id: str = ''
Wei Shoulin's avatar
Wei Shoulin committed
25
26
27
28
29
30
31
32
33
34
35
36
    spectra_id : str = ""
    level1_id: int=0
    region: str=""
    filename : str=""
    file_path: str=""
    qc1_status: int = 0
    qc1_time: str=""
    prc_status: int = 0
    prc_time: str=""
    create_time: str=""
    pipeline_id: str=""    

Wei Shoulin's avatar
Wei Shoulin committed
37
38
39
40
41
42
43
44
45
46
@dataclasses.dataclass
class Level1PrcRecord(BaseModel):
    id: int = 0
    level1_id: int = 0
    pipeline_id: str = ""
    prc_module: str = ""
    params_file_path: str=""
    prc_status: int = 0
    prc_time: str=""
    result_file_path: str=""