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

title Domain Model Real Estate USA


' Actor Region
abstract class User{
    email
    name
    password
    taxNumber
    passportNumber
    phoneNumber
}


class Employee extends User{
    'admitionDate
}


abstract  class Property{
    area
    cityCenterDistance
}

class Land extends Property{

}

abstract class  Building extends Property{
    bedroomNumber
    bathroomNumber
    parkingSpaceNumber
    airConditioner
    centralHeating
}
class Apartment extends Building{

}
class House extends Building{
    basement
    loft
    sunExposure
}


class Announcement{
    announcementDate
    publicationDate
    statusType
}

class Commission{
   fixedCommission
   commissionValue
}

class Deal{
    dealType
    dealValue
    contractDuration
}


Announcement "1" --"1" Deal: has >
Announcement "1" -- "1" Property : from >
Employee "1" - "0.*" Announcement : with role Agent, approve and publish order >

Employee "1" - "1" Commission : with role Agent, set >
Announcement "1" -- "1" Commission : has >

@enduml
