Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-commons
Commits
c118339e
Commit
c118339e
authored
3 years ago
by
Wei Shoulin
Browse files
Options
Download
Email Patches
Plain Diff
new id
parent
6df5b472
main
master
1.0.1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
csst_dfs_commons/models/common.py
+2
-0
csst_dfs_commons/models/common.py
csst_dfs_commons/models/facility.py
+4
-4
csst_dfs_commons/models/facility.py
with
6 additions
and
4 deletions
+6
-4
csst_dfs_commons/models/common.py
+
2
-
0
View file @
c118339e
...
...
@@ -21,6 +21,8 @@ class BaseModel:
return
self
def
from_proto_model
(
self
,
record
):
if
record
is
None
:
return
None
for
k
in
self
.
__dataclass_fields__
.
keys
():
self
.
__setattr__
(
k
,
record
.
__getattribute__
(
k
))
return
self
...
...
This diff is collapsed.
Click to expand it.
csst_dfs_commons/models/facility.py
+
4
-
4
View file @
c118339e
...
...
@@ -39,21 +39,21 @@ class DetectorStatus(BaseModel):
@
dataclasses
.
dataclass
class
Brick
(
BaseModel
):
id
:
int
=
0
id
:
int
=
-
1
ra
:
float
=
0.0
dec
:
float
=
0.0
boundingbox
:
str
=
""
@
dataclasses
.
dataclass
class
BrickObsStatus
(
BaseModel
):
brick_id
:
int
=
0
brick_id
:
int
=
-
1
band
:
str
=
""
cover_num
:
int
=
0
update_time
:
str
=
""
@
dataclasses
.
dataclass
class
BrickLevel1
(
BaseModel
):
brick_id
:
int
=
0
brick_id
:
int
=
-
1
level1_id
:
int
=
0
obs_id
:
str
=
""
module
:
str
=
""
...
...
@@ -83,7 +83,7 @@ class Level2ProducerRuning(BaseModel):
id
:
int
=
0
job_id
:
int
=
0
producer_id
:
int
=
0
brick_id
:
int
=
0
brick_id
:
int
=
-
1
start_time
:
str
=
""
end_time
:
str
=
""
prc_status
:
int
=
0
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets