modify live model
This commit is contained in:
parent
a664b8cc6c
commit
8b4c27dfe2
|
@ -1295,25 +1295,9 @@ class Live(JoinedWithOneDeviceMixin, ActionWithOneDevice):
|
||||||
information about its state (in the form of a ``Snapshot`` action)
|
information about its state (in the form of a ``Snapshot`` action)
|
||||||
and usage statistics.
|
and usage statistics.
|
||||||
"""
|
"""
|
||||||
ip = Column(IP, nullable=False,
|
serial_number = Column(Unicode(), check_lower('serial_number'))
|
||||||
comment='The IP where the live was triggered.')
|
serial_number.comment = """The serial number of the HardDisk in lower case."""
|
||||||
subdivision_confidence = Column(SmallInteger,
|
time = Column(Interval)
|
||||||
check_range('subdivision_confidence', 0, 100),
|
|
||||||
nullable=False)
|
|
||||||
subdivision = Column(DBEnum(Subdivision), nullable=False)
|
|
||||||
city = Column(Unicode(STR_SM_SIZE), check_lower('city'), nullable=False)
|
|
||||||
city_confidence = Column(SmallInteger,
|
|
||||||
check_range('city_confidence', 0, 100),
|
|
||||||
nullable=False)
|
|
||||||
isp = Column(Unicode(STR_SM_SIZE), check_lower('isp'), nullable=False)
|
|
||||||
organization = Column(Unicode(STR_SM_SIZE), check_lower('organization'))
|
|
||||||
organization_type = Column(Unicode(STR_SM_SIZE), check_lower('organization_type'))
|
|
||||||
|
|
||||||
@property
|
|
||||||
def country(self) -> Country:
|
|
||||||
return self.subdivision.country
|
|
||||||
# todo relate to snapshot
|
|
||||||
# todo testing
|
|
||||||
|
|
||||||
|
|
||||||
class Organize(JoinedTableMixin, ActionWithMultipleDevices):
|
class Organize(JoinedTableMixin, ActionWithMultipleDevices):
|
||||||
|
|
Reference in a new issue