/**
 * User Repository Interface
 * Defines contract for user data access
 */
class IUserRepository {
  /**
   * Find user by ID
   * @param {number} id 
   * @returns {Promise<User|null>}
   */
  async findById(id) {
    throw new Error('Method findById() must be implemented');
  }

  /**
   * Find user by email
   * @param {string} email 
   * @returns {Promise<User|null>}
   */
  async findByEmail(email) {
    throw new Error('Method findByEmail() must be implemented');
  }

  /**
   * Find all users
   * @returns {Promise<User[]>}
   */
  async findAll() {
    throw new Error('Method findAll() must be implemented');
  }

  /**
   * Create new user
   * @param {User} user 
   * @returns {Promise<User>}
   */
  async create(user) {
    throw new Error('Method create() must be implemented');
  }

  /**
   * Update existing user
   * @param {User} user 
   * @returns {Promise<User>}
   */
  async update(user) {
    throw new Error('Method update() must be implemented');
  }

  /**
   * Delete user by ID
   * @param {number} id 
   * @returns {Promise<boolean>}
   */
  async delete(id) {
    throw new Error('Method delete() must be implemented');
  }
}

module.exports = IUserRepository;
