From 2abb35c6e78b74a2128ab72c8c5ec58719ab5fd7 Mon Sep 17 00:00:00 2001 From: shoulinwei Date: Sun, 25 Dec 2022 19:49:51 +0800 Subject: [PATCH] hstdm --- csst_dfs_commons/models/facility.py | 1 + csst_dfs_commons/models/hstdm.py | 31 +++++++++++++++++++++++++++++ csst_dfs_commons/models/msc.py | 1 + csst_dfs_commons/models/sls.py | 1 + 4 files changed, 34 insertions(+) create mode 100644 csst_dfs_commons/models/hstdm.py diff --git a/csst_dfs_commons/models/facility.py b/csst_dfs_commons/models/facility.py index 40d4597..c6b2a2b 100644 --- a/csst_dfs_commons/models/facility.py +++ b/csst_dfs_commons/models/facility.py @@ -108,6 +108,7 @@ class Level0Record(BaseModel): level0_id: str = "" obs_id: str = "" detector_no: str = "" + filter: str="" obs_type: str = "" obs_time: str="" exp_time: float = 0 diff --git a/csst_dfs_commons/models/hstdm.py b/csst_dfs_commons/models/hstdm.py new file mode 100644 index 0000000..c227067 --- /dev/null +++ b/csst_dfs_commons/models/hstdm.py @@ -0,0 +1,31 @@ +import dataclasses +from typing import Dict +from .common import BaseModel, default_field + +@dataclasses.dataclass +class Level1Record(BaseModel): + id: int = 0 + level0_id : str = "" + data_type: str="" + cor_sci_id: int = 0 + 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({}) + +@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="" diff --git a/csst_dfs_commons/models/msc.py b/csst_dfs_commons/models/msc.py index 58475d7..00cb025 100644 --- a/csst_dfs_commons/models/msc.py +++ b/csst_dfs_commons/models/msc.py @@ -9,6 +9,7 @@ class Level1Record(BaseModel): data_type: str="" cor_sci_id: int = 0 prc_params: str="" + filter: str="" filename : str="" file_path: str="" qc1_status: int = 0 diff --git a/csst_dfs_commons/models/sls.py b/csst_dfs_commons/models/sls.py index b62673c..732cbbc 100644 --- a/csst_dfs_commons/models/sls.py +++ b/csst_dfs_commons/models/sls.py @@ -8,6 +8,7 @@ class Level1Record(BaseModel): level0_id : str = "" data_type: str="" prc_params: str="" + filter: str="" filename : str="" file_path: str="" qc1_status: int = 0 -- GitLab