import 'package:floor/floor.dart';
import 'package:skillcourt/entity/club.dart';

@dao
abstract class ClubDao {
  @Query('Select * from clubs')
  Future<List<Club>> findAllClubs();

  @Query('Select * from clubs where id = :id')
  Future<Club?> findClubById(int id);

  @insert
  Future<void> insertClub(Club club);

  @update
  Future<void> updateClub(Club club);

  @delete
  Future<void> deleteClub(Club club);

  @Query('Select COUNT(*) from clubs')
  Future<int?> countClubs();
}
