diff --git a/care/facility/migrations/0308_auto_20220805_2247.py b/care/facility/migrations/0308_auto_20220805_2247.py new file mode 100644 index 0000000000..a82a2015c8 --- /dev/null +++ b/care/facility/migrations/0308_auto_20220805_2247.py @@ -0,0 +1,20 @@ +# Generated by Django 2.2.11 on 2022-08-05 17:17 + +import care.utils.models.validators +import django.contrib.postgres.fields.jsonb +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('facility', '0307_auto_20220805_1933'), + ] + + operations = [ + migrations.AlterField( + model_name='asset', + name='meta', + field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict, validators=[care.utils.models.validators.JSONFieldSchemaValidator({'$schema': 'http://json-schema.org/draft-07/schema#', 'anyOf': [{'$ref': '#/definitions/onvif'}, {'$ref': '#/definitions/hl7monitor'}, {'$ref': '#/definitions/empty'}], 'definitions': {'empty': {'additionalProperties': False, 'type': 'object'}, 'hl7monitor': {'additionalProperties': False, 'properties': {'asset_type': {'type': 'string'}, 'insecure_connection': {'type': 'boolean'}, 'local_ip_address': {'type': 'string'}, 'middleware_hostname': {'type': 'string'}}, 'required': ['local_ip_address', 'middleware_hostname'], 'type': 'object'}, 'onvif': {'additionalProperties': False, 'properties': {'asset_type': {'type': 'string'}, 'camera_access_key': {'type': 'string'}, 'camera_type': {'type': 'string'}, 'insecure_connection': {'type': 'boolean'}, 'local_ip_address': {'type': 'string'}, 'middleware_hostname': {'type': 'string'}}, 'required': ['local_ip_address', 'middleware_hostname', 'camera_access_key', 'camera_type'], 'type': 'object'}}})]), + ), + ] diff --git a/care/facility/models/json_schema/asset.py b/care/facility/models/json_schema/asset.py index b31d36f2be..c112a9c513 100644 --- a/care/facility/models/json_schema/asset.py +++ b/care/facility/models/json_schema/asset.py @@ -4,6 +4,7 @@ "properties": { "local_ip_address": {"type": "string"}, "middleware_hostname": {"type": "string"}, + "asset_type": {"type": "string"}, "insecure_connection": {"type": "boolean"}, }, "additionalProperties": False, @@ -22,6 +23,7 @@ "middleware_hostname": {"type": "string"}, "camera_access_key": {"type": "string"}, "camera_type": {"type": "string"}, + "asset_type": {"type": "string"}, "insecure_connection": {"type": "boolean"}, }, "additionalProperties": False,