package com.ffii.fpsms.modules.master.entity

import com.ffii.core.support.AbstractRepository
import org.springframework.stereotype.Repository

@Repository
interface EquipmentDetailRepository : AbstractRepository<EquipmentDetail, Long> {
    fun findAllByDeletedFalse(): List<EquipmentDetail>;
    fun findByCode(code: String): EquipmentDetail?
    fun findByIdAndDeletedFalse(id: Long): EquipmentDetail?;
    fun findByNameAndDeletedIsFalse(name: String): EquipmentDetail?;
    fun findByCodeAndDeletedIsFalse(code: String): EquipmentDetail?;

    fun findByDescriptionAndDeletedIsFalse(description: String): EquipmentDetail?;
    fun findByEquipmentTypeIdAndDeletedFalse(equipmentTypeId: Long): List<EquipmentDetail>;
    fun findByEquipmentCode(equipmentCode: String): EquipmentDetail?;
}