package com.persagy.server.meiku.services

import com.persagy.mybatis.SMybatisDao
import com.persagy.server.meiku.models.entities.MeiKuState
import com.persagy.service.SObjectService
import java.util.*

/**
 * 状态
 * @author  wx
 * @date  2020/9/21 11:35
 */
object MeiKuStateService : SObjectService<MeiKuState>(SMybatisDao(MeiKuState::class.java)) {

    override fun onCreateBefore(entity: MeiKuState): Boolean {
        if (entity.id.isNullOrEmpty()){
            entity.id = UUID.randomUUID().toString().replace("-", "")
        }
        return super.onCreateBefore(entity)
    } //
} // Object MeiKuStateService