package com.saas.shared.service;

import java.util.List;

/**
 * Base CRUD service interface
 * Defines standard operations for all CRUD services
 * 
 * @param <T>         Entity type
 * @param <ID>        ID type (usually Long)
 * @param <CreateReq> Create request DTO
 * @param <UpdateReq> Update request DTO
 * @param <Response>  Response DTO
 */
public interface BaseCrudService<T, ID, CreateReq, UpdateReq, Response> {

    /**
     * Get entity by ID
     * 
     * @throws com.saas.shared.exception.ResourceNotFoundException if not found
     */
    Response getById(ID id);

    /**
     * Get all entities
     */
    List<Response> getAll();

    /**
     * Create new entity
     */
    Response create(CreateReq request);

    /**
     * Update existing entity
     * 
     * @throws com.saas.shared.exception.ResourceNotFoundException if not found
     */
    Response update(ID id, UpdateReq request);

    /**
     * Delete entity by ID
     * 
     * @throws com.saas.shared.exception.ResourceNotFoundException if not found
     */
    void delete(ID id);
}
