package cn.sagacloud.server.algorithm.services

import cn.sagacloud.server.algorithm.models.entities.*
import cn.sagacloud.server.algorithm.models.log.SyncLogEntity
import cn.sagacloud.server.algorithm.models.modelFile.FloorModel
import cn.sagacloud.server.algorithm.models.modelFile.ModelFile
import cn.sagacloud.server.algorithm.models.modelFile.ModelFileFolder
import cn.sagacloud.server.algorithm.models.monitor.ModelMonitor
import com.sybotan.mybatis.SMybatisDao
import com.sybotan.service.SObjectService
import org.springframework.stereotype.Component

/**
 *
 *
 * @author jxing
 */
object BaseDataService {
    val modelFileService = SObjectService(SMybatisDao(ModelFile::class.java))
    val modelMonitorService = SObjectService(SMybatisDao(ModelMonitor::class.java))
    val columnService = SObjectService(SMybatisDao(Column::class.java))
    val doorService = SObjectService(SMybatisDao(Door::class.java))
    val spaceService = SObjectService(SMybatisDao(Space::class.java))
    val virtualWallService = SObjectService(SMybatisDao(VirtualWall::class.java))
    val wallService = SObjectService(SMybatisDao(Wall::class.java))
    val windowService = SObjectService(SMybatisDao(Window::class.java))
    val beaconService = SObjectService(SMybatisDao(Beacon::class.java))
    val floorModelService = SObjectService(SMybatisDao(FloorModel::class.java))
    var boundarySegmentService = SObjectService(SMybatisDao(BoundarySegment::class.java))
    val folderService = SObjectService(SMybatisDao(ModelFileFolder::class.java))     // 连接线断
    val connectorService = SObjectService(SMybatisDao(Connector::class.java))   // 连接件
    val otherService = SObjectService(SMybatisDao(Other::class.java))      // 其他对象
    val joinObjectService = SObjectService(SMybatisDao(JoinObject::class.java))      // 其他对象
    val gridService = SObjectService(SMybatisDao(Grid::class.java))  // 轴网
    val levelService = SObjectService(SMybatisDao(Level::class.java))  // 标高
    val pipeService = SObjectService(SMybatisDao(Pipe::class.java))  // 标高
    val ductService = SObjectService(SMybatisDao(Duct::class.java))  // 标高
    val equipmentService = SObjectService(SMybatisDao(Equipment::class.java))  // 标高
    val componentService = SObjectService(SMybatisDao(EquipPart::class.java))  // 标高
    val syncLogService = SObjectService(SMybatisDao(SyncLogEntity::class.java))  // 标高

    val roomService = SObjectService(SMybatisDao(Room::class.java))  // 房间
    val projectService = SObjectService(SMybatisDao(Project::class.java))  // 项目
    val dictCompService = SObjectService(SMybatisDao(DictComp::class.java))  // 字典对照
    val equipCompService = SObjectService(SMybatisDao(EquipComp::class.java))  // 设备对照
    val pdCompService = SObjectService(SMybatisDao(PipeDuctComp::class.java))  // 管道对照
    val infoPointCompService = SObjectService(SMybatisDao(InfoPointComp::class.java))  // 信息点对照
    val unrecognizedEquipService = SObjectService(SMybatisDao(UnrecognizedEquip::class.java))  // 未识别设备类
}