@startuml

package dao {


    interface ScoreOfferDao{
    }
    class ScoreOfferDaoMySQL
    interface CommentDao{
    }
    class CommentDaoMySQL

    AbstractFactoryDao <|-- FactoryDaoSQL
    ScoreOfferDao <|.. ScoreOfferDaoMySQL
    CommentDao <|.. CommentDaoMySQL

    interface DAO<T>{
        find(id : int) : T
        create(T obj) : boolean
        update(T obj) : boolean
        delete(T obj) : boolean
    }

    abstract AbstractFactoryDao{
        - {static} final connectionDB : ConnectionDB
        + {static} getFactory(type : TypeDB) : AbstractFactoryDao
        + getScoreOfferDao() : ScoreOfferDao
    }

    class FactoryDaoSQL{
    }

    DAO <|- ScoreOfferDao
    DAO <|-left CommentDao
}
package db{
    class ConnectionDBMySQL{
        - connection : Connection
        - ConnectionDBMySQL()
        + {static} getInstance() : ConnectionDBMySQL
        + getDb() : Connection
    }

    class LazyHolderDB{
        + {static} final INSTANCE : ConnectionDBMySQL
    }
    interface ConnectionDB
    ConnectionDBMySQL -Left-> LazyHolderDB
    ConnectionDBMySQL .up.|> ConnectionDB

}
package business{
    class SessionFacade{
        + SessionFacade()
        + login(mail : String, password : String) : Void
        + register(email : String, firstName : String, lastName : String, city : String, phoneNumber : String, password : String) : Void
        + getInstance() : SessionFacade
    }

    class EvaluationFacade{
        + rate(offerId : int, rate : int) : Void
        + comment(offerId : int, comment : String) : Void
        + deleteComment(commentId : int) : Void
        + deleteRate(idRate : int) : Void
    }

}

package gui{

    class LoadView{
        + {static} load(nameFxml : Parent) : Parent
        + {static} changeScreen(actionEvent : ActionEvent, view : String) : void
    }

    package controller{
        class EvaluationController{
            + handleRate(offerId : int, rate : int) : void
            + handleComment(offerId : int, comment : String)
            + handleDeleteComment(commentId : int) : Void
            + handleDeleteRate(idRate : int) : Void
        }

    }
}
EvaluationFacade <--Up- EvaluationController
EvaluationFacade --> SessionFacade
EvaluationFacade --> AbstractFactoryDao



@enduml