| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| 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 UploadModel: |
|
| 16 | """Upload_id Model""" |
||
| 17 | |||
| 18 | 1 | def __init__(self, upload_id): |
|
| 19 | 1 | self.upload_id = str(upload_id) |
|
| 20 | 1 | self.release_date = datetime.datetime.now() |
|
| 21 | |||
| 22 | |||
| 23 | 1 | class ErrorModel: |
|
| 24 | """Error Model""" |
||
| 25 | |||
| 26 | 1 | def __init__(self, error): |
|
| 27 | 1 | self.error = str(error) |
|
| 28 | 1 | self.errorDate = datetime.datetime.now() |
|
| 29 | |||
| 30 | |||
| 31 | 1 | class FileNotFoundModel: |
|
| 32 | """FileNotFound Model""" |
||
| 33 | |||
| 34 | 1 | def __init__(self, reason): |
|
| 35 | 1 | self.reason = reason |
|
| 36 | self.errorDate = datetime.datetime.now() |
||
| 37 |