@startuml enum "RoomType" as room_type { LIVING_ROOM BEDROOM KITCHEN BATHROOM HALLWAY OFFICE GARAGE GARDEN BALCONY } entity "User" as user <<Auth Service>> { + id: UUID <<PK>> -- + email: String + password_hash: String + username: String + is_active: Boolean + created_at: Timestamp + update_at: Timestamp } entity "Home" as home <<Location Service>> { + id: String <<PK>> + user_id: String <<FK>> -- + title: String + address: String + created_at: Timestamp + update_at: Timestamp } entity "Room" as room <<Location Service>> { + id: String <<PK>> + home_id: String <<FK>> -- + name: String + room_type: RoomType + floor: Integer + created_at: Timestamp + update_at: Timestamp } entity "HeatingDevice" as heating_device <<Heating Service>> { + id: UUID <<PK>> + room_id: UUID <<FK>> -- + cloud_device_id: String + title: String + default_temperature: Double + min_temperature: Double + max_temperature: Double + created_at: Timestamp + update_at: Timestamp } entity "LightDevice" as light_device <<Light Service>> { + id: UUID <<PK>> + room_id: UUID <<FK>> -- + cloud_device_id: String + title: String + default_brightness: Integer + default_color: String + created_at: Timestamp + update_at: Timestamp } entity "GateDevice" as gate_device <<Gates Service>> { + id: UUID <<PK>> + room_id: UUID <<FK>> -- + cloud_device_id: String + title: String + auto_lock_enabled: Boolean + lock_delay_minutes: Integer + created_at: Timestamp + update_at: Timestamp } entity "VideoDevice" as video_device <<Video Service>> { + video_device_id: UUID <<PK>> + room_id: UUID <<FK>> -- + cloud_device_id: String + title: String + recording_enabled: Boolean + created_at: Timestamp + update_at: Timestamp } entity "TemperatureHistory" as temp_history <<Heating Service>> { + id: UUID <<PK>> + heating_device_id: UUID <<FK>> -- + temperature: Double + recorded_at: Timestamp } entity "EnergyConsumption" as energy_log <<Heating Service>> { + id: UUID <<PK>> + heating_device_id: UUID <<FK>> -- + power_used: Double + recorded_at: Timestamp } entity "LightUsageHistory" as light_history <<Light Service>> { + id: UUID <<PK>> + light_device_id: UUID <<FK>> -- + was_on: Boolean + brightness: Integer + color: String + recorded_at: Timestamp } entity "LightGroup" as light_group <<Light_Service>> { + group_id: UUID <<PK>> + light_device_id: UUID <<FK>> -- + created_at: Timestamp + update_at: Timestamp } user }o--o{ home : accesses home ||--o{ room : contains ' Device to Room references (CROSS-SERVICE - no FK constraints) heating_device }.. room : located_in light_device }.. room : located_in gate_device }.. room : located_in video_device }.. room : located_in ' Telemetry relationships heating_device ||--o{ temp_history : has_temperature_history heating_device ||--o{ energy_log : has_energy_consumption light_device ||--o{ light_history : has_usage_history ' Room type enum room }--|| room_type : has_type light_group }o--o{ light_device: contains note top of heating_device room_id ссылается на room.id из Location Service НЕ foreign key (разные БД) end note note top of light_device room_id ссылается на room.id из Location Service НЕ foreign key (разные БД) end note note top of home user_id ссылается на user.id из Auth Service НЕ foreign key (разные БД) end note @enduml
Decode URL
Submit
amiga
aws-orange
black-knight
bluegray
blueprint
cerulean-outline
cerulean
crt-amber
crt-green
cyborg-outline
cyborg
hacker
lightgray
mars
materia-outline
materia
metal
mimeograph
minty
plain
reddress-darkblue
reddress-darkgreen
reddress-darkorange
reddress-darkred
reddress-lightblue
reddress-lightgreen
reddress-lightorange
reddress-lightred
sandstone
silver
sketchy-outline
sketchy
spacelab
spacelab-white
superhero-outline
superhero
toy
united
vibrant
🎉 Discover the future PlantUML Web Editor! 🚀
PNG
SVG
ASCII Art