2019-06-29 14:26:14 +00:00
|
|
|
from datetime import date, datetime
|
2019-05-03 12:31:49 +00:00
|
|
|
from fractions import Fraction
|
2018-11-09 10:22:13 +00:00
|
|
|
from operator import attrgetter
|
2019-05-03 12:31:49 +00:00
|
|
|
from typing import Dict, Generator, Iterable, List, Optional, Set, Type, TypeVar
|
2018-06-10 16:47:49 +00:00
|
|
|
|
2018-10-05 15:13:23 +00:00
|
|
|
from boltons import urlutils
|
2018-09-30 17:40:28 +00:00
|
|
|
from boltons.urlutils import URL
|
2018-06-10 16:47:49 +00:00
|
|
|
from colour import Color
|
2018-06-20 21:18:15 +00:00
|
|
|
from sqlalchemy import Column, Integer
|
2018-08-27 14:32:45 +00:00
|
|
|
from sqlalchemy.orm import relationship
|
2018-09-30 17:40:28 +00:00
|
|
|
from teal.db import Model
|
2018-10-23 13:37:37 +00:00
|
|
|
from teal.enums import Layouts
|
2018-06-10 16:47:49 +00:00
|
|
|
|
2019-05-11 14:27:22 +00:00
|
|
|
from ereuse_devicehub.resources.action import models as e
|
2018-10-13 12:53:46 +00:00
|
|
|
from ereuse_devicehub.resources.agent.models import Agent
|
|
|
|
from ereuse_devicehub.resources.device import states
|
2019-07-01 18:39:32 +00:00
|
|
|
from ereuse_devicehub.resources.enums import BatteryTechnology, CameraFacing, ComputerChassis, \
|
2019-05-03 12:31:49 +00:00
|
|
|
DataStorageInterface, DisplayTech, PrinterTechnology, RamFormat, RamInterface
|
2018-08-27 14:32:45 +00:00
|
|
|
from ereuse_devicehub.resources.lot.models import Lot
|
2018-06-10 16:47:49 +00:00
|
|
|
from ereuse_devicehub.resources.models import Thing
|
|
|
|
from ereuse_devicehub.resources.tag import Tag
|
2018-11-21 13:26:56 +00:00
|
|
|
from ereuse_devicehub.resources.tag.model import Tags
|
2018-06-10 16:47:49 +00:00
|
|
|
|
2019-05-11 14:27:22 +00:00
|
|
|
E = TypeVar('E', bound=e.Action)
|
2019-05-03 12:31:49 +00:00
|
|
|
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
class Device(Thing):
|
2019-05-11 14:27:22 +00:00
|
|
|
ACTION_SORT_KEY = attrgetter('created')
|
2018-11-09 10:22:13 +00:00
|
|
|
|
2018-06-10 16:47:49 +00:00
|
|
|
id = ... # type: Column
|
|
|
|
type = ... # type: Column
|
|
|
|
hid = ... # type: Column
|
|
|
|
model = ... # type: Column
|
|
|
|
manufacturer = ... # type: Column
|
|
|
|
serial_number = ... # type: Column
|
|
|
|
weight = ... # type: Column
|
|
|
|
width = ... # type: Column
|
|
|
|
height = ... # type: Column
|
|
|
|
depth = ... # type: Column
|
|
|
|
color = ... # type: Column
|
2018-09-20 16:25:47 +00:00
|
|
|
lots = ... # type: relationship
|
2018-10-23 13:37:37 +00:00
|
|
|
production_date = ... # type: Column
|
2019-05-03 12:31:49 +00:00
|
|
|
brand = ... # type: Column
|
|
|
|
generation = ... # type: Column
|
2019-06-29 14:26:14 +00:00
|
|
|
version = ... # type: Column
|
2019-05-08 17:12:05 +00:00
|
|
|
variant = ... # type: Column
|
2019-06-29 14:26:14 +00:00
|
|
|
sku = ... # type: Column
|
2019-07-07 19:36:09 +00:00
|
|
|
image = ... #type: Column
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.id = ... # type: int
|
|
|
|
self.type = ... # type: str
|
2019-05-03 12:31:49 +00:00
|
|
|
self.hid = ... # type: Optional[str]
|
|
|
|
self.model = ... # type: Optional[str]
|
|
|
|
self.manufacturer = ... # type: Optional[str]
|
|
|
|
self.serial_number = ... # type: Optional[str]
|
|
|
|
self.weight = ... # type: Optional[float]
|
|
|
|
self.width = ... # type:Optional[float]
|
|
|
|
self.height = ... # type: Optional[float]
|
|
|
|
self.depth = ... # type: Optional[float]
|
|
|
|
self.color = ... # type: Optional[Color]
|
2018-06-10 16:47:49 +00:00
|
|
|
self.physical_properties = ... # type: Dict[str, object or None]
|
2019-05-11 14:27:22 +00:00
|
|
|
self.actions_multiple = ... # type: Set[e.ActionWithMultipleDevices]
|
|
|
|
self.actions_one = ... # type: Set[e.ActionWithOneDevice]
|
2018-11-21 13:26:56 +00:00
|
|
|
self.tags = ... # type: Tags[Tag]
|
2018-09-20 16:25:47 +00:00
|
|
|
self.lots = ... # type: Set[Lot]
|
2019-05-03 12:31:49 +00:00
|
|
|
self.production_date = ... # type: Optional[datetime]
|
|
|
|
self.brand = ... # type: Optional[str]
|
|
|
|
self.generation = ... # type: Optional[int]
|
2019-06-29 14:26:14 +00:00
|
|
|
self.version = ... # type: Optional[str]
|
2019-05-08 17:12:05 +00:00
|
|
|
self.variant = ... # type: Optional[str]
|
2019-06-29 14:26:14 +00:00
|
|
|
self.sku = ... # type: Optional[str]
|
2019-07-07 19:36:09 +00:00
|
|
|
self.image = ... # type: Optional[urlutils.URL]
|
2018-06-10 16:47:49 +00:00
|
|
|
|
2018-11-09 10:22:13 +00:00
|
|
|
@property
|
2019-05-11 14:27:22 +00:00
|
|
|
def actions(self) -> List[e.Action]:
|
2018-11-09 10:22:13 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
2019-05-11 14:27:22 +00:00
|
|
|
def problems(self) -> List[e.Action]:
|
2018-11-09 10:22:13 +00:00
|
|
|
pass
|
|
|
|
|
2018-10-05 15:13:23 +00:00
|
|
|
@property
|
|
|
|
def url(self) -> urlutils.URL:
|
|
|
|
pass
|
2018-06-10 16:47:49 +00:00
|
|
|
|
2018-10-13 12:53:46 +00:00
|
|
|
@property
|
2019-04-23 19:27:31 +00:00
|
|
|
def rate(self) -> Optional[e.Rate]:
|
2018-10-13 12:53:46 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
2018-11-09 10:22:13 +00:00
|
|
|
def price(self) -> Optional[e.Price]:
|
2018-10-13 12:53:46 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
2018-11-09 10:22:13 +00:00
|
|
|
def trading(self) -> Optional[states.Trading]:
|
2018-10-13 12:53:46 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
2018-11-09 10:22:13 +00:00
|
|
|
def physical(self) -> Optional[states.Physical]:
|
2018-10-13 12:53:46 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
2018-11-09 10:22:13 +00:00
|
|
|
def physical_possessor(self) -> Optional[Agent]:
|
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
def working(self) -> List[e.Test]:
|
2018-10-13 12:53:46 +00:00
|
|
|
pass
|
|
|
|
|
2019-05-11 14:27:22 +00:00
|
|
|
def last_action_of(self, *types: Type[E]) -> E:
|
2018-10-13 12:53:46 +00:00
|
|
|
pass
|
|
|
|
|
2019-05-11 14:27:22 +00:00
|
|
|
def _warning_actions(self, actions: Iterable[e.Action]) -> Generator[e.Action]:
|
2018-11-09 10:22:13 +00:00
|
|
|
pass
|
|
|
|
|
2018-10-13 12:53:46 +00:00
|
|
|
|
2018-06-26 13:35:13 +00:00
|
|
|
class DisplayMixin:
|
|
|
|
technology = ... # type: Column
|
|
|
|
size = ... # type: Column
|
|
|
|
resolution_width = ... # type: Column
|
|
|
|
resolution_height = ... # type: Column
|
2018-10-23 13:37:37 +00:00
|
|
|
refresh_rate = ... # type: Column
|
|
|
|
contrast_ratio = ... # type: Column
|
|
|
|
touchable = ... # type: Column
|
2018-06-26 13:35:13 +00:00
|
|
|
|
|
|
|
def __init__(self) -> None:
|
|
|
|
super().__init__()
|
|
|
|
self.technology = ... # type: DisplayTech
|
|
|
|
self.size = ... # type: Integer
|
|
|
|
self.resolution_width = ... # type: int
|
|
|
|
self.resolution_height = ... # type: int
|
2019-05-03 12:31:49 +00:00
|
|
|
self.refresh_rate = ... # type: Optional[int]
|
|
|
|
self.contrast_ratio = ... # type: Optional[int]
|
|
|
|
self.touchable = ... # type: Optional[bool]
|
|
|
|
self.aspect_ratio = ... #type: Fraction
|
|
|
|
self.widescreen = ... # type: bool
|
2018-06-26 13:35:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Computer(DisplayMixin, Device):
|
|
|
|
components = ... # type: Column
|
|
|
|
chassis = ... # type: Column
|
2019-12-10 23:35:17 +00:00
|
|
|
deposit = ... # type: Column
|
2019-12-11 01:19:13 +00:00
|
|
|
author_id = ... # type: Column
|
2018-06-26 13:35:13 +00:00
|
|
|
|
2018-06-10 16:47:49 +00:00
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.components = ... # type: Set[Component]
|
2019-05-11 14:27:22 +00:00
|
|
|
self.actions_parent = ... # type: Set[e.Action]
|
2018-06-26 13:36:21 +00:00
|
|
|
self.chassis = ... # type: ComputerChassis
|
2019-12-11 01:19:13 +00:00
|
|
|
self.author_id = ...
|
|
|
|
|
2018-10-03 12:51:22 +00:00
|
|
|
@property
|
2019-05-11 14:27:22 +00:00
|
|
|
def actions(self) -> List:
|
2018-10-03 12:51:22 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
def ram_size(self) -> int:
|
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
def data_storage_size(self) -> int:
|
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
def processor_model(self) -> str:
|
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
def graphic_card_model(self) -> str:
|
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
def network_speeds(self) -> List[int]:
|
|
|
|
pass
|
2018-06-10 16:47:49 +00:00
|
|
|
|
2018-11-09 10:22:13 +00:00
|
|
|
@property
|
|
|
|
def privacy(self) -> Set[e.EraseBasic]:
|
|
|
|
pass
|
|
|
|
|
2018-10-13 12:53:46 +00:00
|
|
|
|
2018-06-10 16:47:49 +00:00
|
|
|
class Desktop(Computer):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2018-06-26 13:36:21 +00:00
|
|
|
class Laptop(Computer):
|
2018-10-23 13:37:37 +00:00
|
|
|
layout = ... # type: Column
|
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.layout = ... # type: Layouts
|
2018-06-26 13:35:13 +00:00
|
|
|
|
|
|
|
|
2018-06-26 13:36:21 +00:00
|
|
|
class Server(Computer):
|
2018-06-10 16:47:49 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2018-06-26 13:36:21 +00:00
|
|
|
class Monitor(DisplayMixin, Device):
|
2018-06-10 16:47:49 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2018-06-26 13:36:21 +00:00
|
|
|
class ComputerMonitor(Monitor):
|
2018-06-10 16:47:49 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2018-06-26 13:36:21 +00:00
|
|
|
class TelevisionSet(Monitor):
|
2018-06-10 16:47:49 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2018-06-26 13:36:21 +00:00
|
|
|
class Mobile(Device):
|
|
|
|
imei = ... # type: Column
|
|
|
|
meid = ... # type: Column
|
2019-05-08 17:12:05 +00:00
|
|
|
ram_size = ... # type: Column
|
|
|
|
data_storage_size = ... # type: Column
|
2018-06-20 21:18:15 +00:00
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
2019-05-03 12:31:49 +00:00
|
|
|
self.imei = ... # type: Optional[int]
|
|
|
|
self.meid = ... # type: Optional[str]
|
2019-05-08 17:12:05 +00:00
|
|
|
self.ram_size = ... # type: Optional[int]
|
|
|
|
self.data_storage_size = ... # type: Optional[int]
|
2018-06-26 13:36:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Smartphone(Mobile):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Tablet(Mobile):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Cellphone(Mobile):
|
|
|
|
pass
|
2018-06-20 21:18:15 +00:00
|
|
|
|
|
|
|
|
2018-06-10 16:47:49 +00:00
|
|
|
class Component(Device):
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.parent_id = ... # type: int
|
|
|
|
self.parent = ... # type: Computer
|
2019-05-11 14:27:22 +00:00
|
|
|
self.actions_components = ... # type: Set[e.Action]
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
def similar_one(self, parent: Computer, blacklist: Set[int]) -> 'Component':
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class GraphicCard(Component):
|
|
|
|
memory = ... # type: Column
|
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.memory = ... # type: int
|
|
|
|
|
|
|
|
|
|
|
|
class DataStorage(Component):
|
|
|
|
size = ... # type: Column
|
2018-06-16 10:41:12 +00:00
|
|
|
interface = ... # type: Column
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.size = ... # type: int
|
2018-06-16 10:41:12 +00:00
|
|
|
self.interface = ... # type: DataStorageInterface
|
2018-06-10 16:47:49 +00:00
|
|
|
|
2018-10-13 12:53:46 +00:00
|
|
|
@property
|
2018-11-09 10:22:13 +00:00
|
|
|
def privacy(self) -> Optional[e.EraseBasic]:
|
2018-10-13 12:53:46 +00:00
|
|
|
pass
|
|
|
|
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
class HardDrive(DataStorage):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class SolidStateDrive(DataStorage):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Motherboard(Component):
|
|
|
|
slots = ... # type: Column
|
|
|
|
usb = ... # type: Column
|
|
|
|
firewire = ... # type: Column
|
|
|
|
serial = ... # type: Column
|
|
|
|
pcmcia = ... # type: Column
|
2019-06-29 14:26:14 +00:00
|
|
|
bios_date = ... # type: Column
|
|
|
|
ram_slots = ... # type: Column
|
|
|
|
ram_max_size = ... # type: Column
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.slots = ... # type: int
|
|
|
|
self.usb = ... # type: int
|
|
|
|
self.firewire = ... # type: int
|
|
|
|
self.serial = ... # type: int
|
|
|
|
self.pcmcia = ... # type: int
|
2019-06-29 14:26:14 +00:00
|
|
|
self.bios_date = ... # type: Optional[date]
|
|
|
|
self.ram_slots = ... # type: Optional[int]
|
|
|
|
self.ram_max_size = ... # type: Optional[int]
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
|
2018-10-23 13:37:37 +00:00
|
|
|
class NetworkMixin:
|
2018-06-10 16:47:49 +00:00
|
|
|
speed = ... # type: Column
|
2018-10-23 13:37:37 +00:00
|
|
|
wireless = ... # type: Column
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.speed = ... # type: int
|
2018-10-23 13:37:37 +00:00
|
|
|
self.wireless = ... # type: bool
|
|
|
|
|
|
|
|
|
|
|
|
class NetworkAdapter(NetworkMixin, Component):
|
|
|
|
pass
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Processor(Component):
|
|
|
|
speed = ... # type: Column
|
|
|
|
cores = ... # type: Column
|
|
|
|
address = ... # type: Column
|
2019-02-03 16:12:53 +00:00
|
|
|
threads = ... # type: Column
|
2019-05-03 12:31:49 +00:00
|
|
|
abi = ... # type: Column
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
2019-05-03 12:31:49 +00:00
|
|
|
self.speed = ... # type: Optional[float]
|
|
|
|
self.cores = ... # type: Optional[int]
|
|
|
|
self.threads = ... # type: Optional[int]
|
|
|
|
self.address = ... # type: Optional[int]
|
|
|
|
self.abi = ... # type: Optional[str]
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
class RamModule(Component):
|
|
|
|
size = ... # type: Column
|
|
|
|
speed = ... # type: Column
|
2018-06-16 10:41:12 +00:00
|
|
|
interface = ... # type: Column
|
|
|
|
format = ... # type: Column
|
2018-06-10 16:47:49 +00:00
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.size = ... # type: int
|
|
|
|
self.speed = ... # type: float
|
2018-06-16 10:41:12 +00:00
|
|
|
self.interface = ... # type: RamInterface
|
|
|
|
self.format = ... # type: RamFormat
|
2018-06-26 13:36:21 +00:00
|
|
|
|
|
|
|
|
2018-11-21 15:09:56 +00:00
|
|
|
class SoundCard(Component):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2018-06-26 13:36:21 +00:00
|
|
|
class Display(DisplayMixin, Component):
|
|
|
|
pass
|
2018-09-30 17:40:28 +00:00
|
|
|
|
|
|
|
|
2019-05-03 12:31:49 +00:00
|
|
|
class Battery(Component):
|
|
|
|
wireless = ... # type: Column
|
|
|
|
technology = ... # type: Column
|
|
|
|
size = ... # type: Column
|
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.wireless = ... # type: Optional[bool]
|
|
|
|
self.technology = ... # type: Optional[BatteryTechnology]
|
|
|
|
self.size = ... # type: bool
|
|
|
|
|
|
|
|
|
2019-07-01 18:39:32 +00:00
|
|
|
class Camera(Component):
|
|
|
|
focal_length = ... # type: Column
|
|
|
|
video_height = ... # type: Column
|
|
|
|
video_width = ... # type: Column
|
|
|
|
horizontal_view_angle = ... # type: Column
|
|
|
|
facing = ... # type: Column
|
|
|
|
vertical_view_angle = ... # type: Column
|
|
|
|
video_stabilization = ... # type: Column
|
|
|
|
flash = ... # type: Column
|
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
focal_length = ... # type: Optional[int]
|
|
|
|
video_height = ... # type: Optional[int]
|
|
|
|
video_width = ... # type: Optional[int]
|
|
|
|
horizontal_view_angle = ... # type: Optional[int]
|
|
|
|
facing = ... # type: Optional[CameraFacing]
|
|
|
|
vertical_view_angle = ... # type: Optional[int]
|
|
|
|
video_stabilization = ... # type: Optional[bool]
|
|
|
|
flash = ... # type: Optional[bool]
|
|
|
|
|
|
|
|
|
2018-10-23 13:37:37 +00:00
|
|
|
class ComputerAccessory(Device):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class SAI(ComputerAccessory):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Keyboard(ComputerAccessory):
|
|
|
|
layout = ... # type: Column
|
|
|
|
|
|
|
|
def __init__(self, layout: Layouts, **kwargs):
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.layout = ... # type: Layouts
|
|
|
|
|
|
|
|
|
|
|
|
class Mouse(ComputerAccessory):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class MemoryCardReader(ComputerAccessory):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Networking(NetworkMixin, Device):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Router(Networking):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Switch(Networking):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Hub(Networking):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class WirelessAccessPoint(Networking):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Printer(Device):
|
|
|
|
wireless = ... # type: Column
|
|
|
|
scanning = ... # type: Column
|
|
|
|
technology = ... # type: Column
|
|
|
|
monochrome = ... # type: Column
|
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.wireless = ... # type: bool
|
|
|
|
self.scanning = ... # type: bool
|
|
|
|
self.technology = ... # type: PrinterTechnology
|
|
|
|
self.monochrome = ... # type: bool
|
|
|
|
|
|
|
|
|
|
|
|
class LabelPrinter(Printer):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Sound(Device):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Microphone(Sound):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Video(Device):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class VideoScaler(Video):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Videoconference(Video):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2018-11-12 10:59:49 +00:00
|
|
|
class Cooking(Device):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Mixer(Cooking):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2018-09-30 17:40:28 +00:00
|
|
|
class Manufacturer(Model):
|
|
|
|
CUSTOM_MANUFACTURERS = ... # type: set
|
|
|
|
name = ... # type: Column
|
|
|
|
url = ... # type: Column
|
|
|
|
logo = ... # type: Column
|
|
|
|
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__()
|
|
|
|
self.name = ... # type: str
|
|
|
|
self.url = ... # type: URL
|
|
|
|
self.logo = ... # type: URL
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def add_all_to_session(cls, session):
|
|
|
|
pass
|