package com.persagy.server.meiku.services

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

/**
 *
 * @author  wx
 * @date  2020/9/21 11:31
 */
object MeiKuAnchorService: SObjectService<MeiKuAnchor>(SMybatisDao(MeiKuAnchor::class.java)) {

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

} // Object MeiKuAnchorService