From a93c2737f610941e4d871e7e3a65de87ab5e0651 Mon Sep 17 00:00:00 2001 From: nad Date: Tue, 18 Feb 2020 13:50:48 +0100 Subject: [PATCH] first iteration with mobile schema/model --- ereuse_devicehub/resources/device/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index ce5ac219..7d0791bc 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -492,9 +492,10 @@ class Mobile(Device): meid.comment = """The Mobile Equipment Identifier as a hexadecimal string. """ - ram_size = db.Column(db.Integer, check_range(1, )) + ram_size = db.Column(db.Integer, check_range('ram_size', min=128, max=36000)) ram_size.comment = """The total of RAM of the device in MB.""" - data_storage_size = db.Column(db.Integer) + data_storage_size = db.Column(db.Integer, check_range('data_storage_size', 0, 10 ** 8)) + data_storage_size.comment = """The total of data storage of the device in MB""" @validates('imei') def validate_imei(self, _, value: int):