| Total Complexity | 5 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 95% |
| Changes | 0 | ||
| 1 | """Provides Rest API models |
||
| 2 | """ |
||
| 3 | |||
| 4 | 1 | import datetime |
|
| 5 | |||
| 6 | |||
| 7 | 1 | class StatusModel: |
|
| 8 | """Status Model""" |
||
| 9 | |||
| 10 | 1 | def __init__(self, status, version): |
|
| 11 | 1 | self.status = status |
|
| 12 | 1 | self.version = version |
|
| 13 | |||
| 14 | |||
| 15 | 1 | class ListUploadFiles: |
|
| 16 | """ListUploadFiles Model""" |
||
| 17 | |||
| 18 | 1 | def __init__(self, file_list): |
|
| 19 | self.fileList = file_list |
||
| 20 | |||
| 21 | |||
| 22 | 1 | class UploadModel: |
|
| 23 | """Upload_id Model""" |
||
| 24 | |||
| 25 | 1 | def __init__(self, upload_id): |
|
| 26 | 1 | self.upload_id = str(upload_id) |
|
| 27 | 1 | self.release_date = datetime.datetime.now() |
|
| 28 | |||
| 29 | |||
| 30 | 1 | class ErrorModel: |
|
| 31 | """Error Model""" |
||
| 32 | |||
| 33 | 1 | def __init__(self, error): |
|
| 34 | 1 | self.error = str(error) |
|
| 35 | 1 | self.errorDate = datetime.datetime.now() |
|
| 36 | |||
| 37 | |||
| 38 | 1 | class FileNotFoundModel: |
|
| 39 | """FileNotFound Model""" |
||
| 40 | |||
| 41 | 1 | def __init__(self, reason): |
|
| 42 | 1 | self.reason = reason |
|
| 43 | self.errorDate = datetime.datetime.now() |
||
| 44 |