@startuml
skinparam monochrome true
skinparam packageStyle rectangle
skinparam shadowing false
'skinparam linetype ortho
'left to right direction
skinparam classAttributeIconSize 20
hide circle
hide methods

title Domain Model

class Person {
    name
    taxNumber
    emailAddress
    telephoneNumber
}

class User {
    name
    emailAddress
    password
}

class Apartment {

}

class PassportCard {
    passportNumber
}

class Role {
    id
    description
}

class Owner {
}

class Agency {
    id
    agencyName
    emailAddress
    telephoneNumber
}

class Property {
    areaOfProperty
    distanceFromCentre
    dateOfAcceptance
    dateOfRequest
}

class TypeOfTransaction{
    transactionType
    monetaryValue
}

class Photo{
    photoID
    pathToPNG
}

class PropertyType {
    designation
}

class Building {
    bedrooms
    bathrooms
    parkingSpaces
    availableEquipment
}

class House{
    basement
    loft
    sunExposure
}

class Agent{
}

class Address{
    street
    city
    district
    state
    zipCode
}

class AnnouncementRepository{
}

class Equipment{
    name
}

class Employee{
    id
    description
}

class PropertyRepository{}

Employee --|> Person
Employee --|> User
Agency --* Employee
User <|-- Owner
User <|- Agent
Owner -left|> Person
Person <|- Agent
Person *- Role
Person *- PassportCard
Property <|-- Land
Property *-- PropertyType
Agency -down* Agent
Property "1" -> "1" PropertyRepository : > wants to store the property
Property <--- Agent : wants to register a property
Property <|--- Building
TypeOfTransaction  ---* Property
Building <|-- House
Owner --* Property
PropertyRepository "1" --right> "1" AnnouncementRepository : > publishes announcement
Equipment -up* Building
Photo ---* Property
Address -up* Person
Address --* Property
Address --* Agency
Apartment --up|> Building
@enduml