This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/ereuse_devicehub/resources/image/models.pyi
Xavier Bustamante Talavera b9f989270d Polish db class diagram
2018-06-10 18:47:49 +02:00

42 lines
1.3 KiB
Python

from uuid import UUID
from sqlalchemy import Column
from sqlalchemy.orm import relationship
from ereuse_devicehub.resources.device.models import Device
from ereuse_devicehub.resources.enums import ImageMimeTypes, Orientation
from ereuse_devicehub.resources.models import Thing
class ImageList(Thing):
id = ... # type: Column
device = ... # type: Column
images = ... # type: relationship
def __init__(self, **kwargs) -> None:
super().__init__(**kwargs)
self.id = ... # type: UUID
self.device = ... # type: Device
self.images = ... # types: List[Image]
class Image(Thing):
id = ... # type: Column
position = ... #type: Column
name = ... # type: Column
content = ... # type: Column
file_format = ... # type: Column
orientation = ... # type: Column
image_list = ... # type: relationship
def __init__(self, **kwargs) -> None:
super().__init__(**kwargs)
self.id = ... # type: UUID
self.position = ... # type: int
self.name = '' # type: str
self.content = ... # type: bytes
self.file_format = ... # type: ImageMimeTypes
self.orientation = ... # type: Orientation
self.image_list_id = ... # type: UUID
self.image_list = ... # type: ImageList