44from typing import Iterable
55from typing import List
66
7+ import lib .core as constances
78from lib .core .enums import SegmentationStatus
89
910
@@ -261,6 +262,8 @@ def __init__(
261262 segmentation_status : int = SegmentationStatus .NOT_STARTED .value ,
262263 prediction_status : int = SegmentationStatus .NOT_STARTED .value ,
263264 meta : ImageInfoEntity = ImageInfoEntity (),
265+ created_at : str = None ,
266+ updated_at : str = None ,
264267 ** _
265268 ):
266269 super ().__init__ (uuid )
@@ -281,6 +284,8 @@ def __init__(
281284 self .segmentation_status = segmentation_status
282285 self .prediction_status = prediction_status
283286 self .meta = meta
287+ self .created_at = created_at
288+ self .updated_at = updated_at
284289
285290 @staticmethod
286291 def from_dict (** kwargs ):
@@ -290,26 +295,35 @@ def from_dict(**kwargs):
290295 if "annotation_status" in kwargs :
291296 kwargs ["annotation_status_code" ] = kwargs ["annotation_status" ]
292297 del kwargs ["annotation_status" ]
298+ if "createdAt" in kwargs :
299+ kwargs ["created_at" ] = kwargs ["createdAt" ]
300+ del kwargs ["createdAt" ]
301+ if "updatedAt" in kwargs :
302+ kwargs ["updated_at" ] = kwargs ["updatedAt" ]
303+ del kwargs ["updatedAt" ]
293304 return ImageEntity (** kwargs )
294305
306+
295307 def to_dict (self ):
296308 data = {
297309 "id" : self .uuid ,
298310 "team_id" : self .team_id ,
311+ "project_id" : self .project_id ,
312+ "folder_id" : self .folder_id ,
299313 "name" : self .name ,
300314 "path" : self .path ,
301- "project_id" : self .project_id ,
302315 "annotation_status" : self .annotation_status_code ,
303- "folder_id" : self .folder_id ,
304- "qa_id" : self .qa_id ,
305- "qa_name" : self .qa_name ,
306- "entropy_value" : self .entropy_value ,
316+ "prediction_status" : self .prediction_status ,
317+ "segmentation_status" : self .segmentation_status ,
307318 "approval_status" : self .approval_status ,
319+ "is_pinned" : self .is_pinned ,
308320 "annotator_id" : self .annotator_id ,
309321 "annotator_name" : self .annotator_name ,
310- "is_pinned" : self .is_pinned ,
311- "segmentation_status" : self .segmentation_status ,
312- "prediction_status" : self .prediction_status ,
322+ "qa_id" : self .qa_id ,
323+ "qa_name" : self .qa_name ,
324+ "entropy_value" : self .entropy_value ,
325+ "createdAt" : self .created_at ,
326+ "updatedAt" : self .updated_at ,
313327 "meta" : self .meta .to_dict (),
314328 }
315329 return {k : v for k , v in data .items () if v is not None }
0 commit comments