/** * Notifications Repository * * Data access layer for Notifications entities. * Extends BaseRepository from @plyaz/db for consistent CRUD operations. * * @example * ```typescript * const repo = NotificationsRepository.create(); * * // Create operations * const entity = await repo.create({ user_id: '...', title: '...', message: '...' }); * * // List operations (inherited from BaseRepository) * const all = await repo.findMany(); * const entity = await repo.findById('123'); * * // Delete operations * await repo.delete('123'); * await repo.softDelete('123'); * ``` */ import { BaseRepository } from '@plyaz/db'; import type { DatabaseResult, PaginatedResult, QueryOptions, DatabaseServiceInterface, OperationConfig } from '@plyaz/types/db'; import type { NotificationsDatabaseRow, CreateNotificationsDTO } from '@plyaz/types/core'; /** * Notifications Repository * * Data access layer for Notifications entities. * * Inherited from BaseRepository (used directly): * - findById(id) - Get entity by ID * - delete(id) - Hard delete entity * - softDelete(id) - Soft delete entity * - exists(id) - Check if entity exists * - query() - Fluent QueryBuilder for complex queries * - count(filter) - Count entities matching filter * - findOne(filter) - Find first matching entity * - update(id, data) - Update entity * * Overridden with domain logic: * - findMany(options) - Default sorting by created_at DESC * - create(data) - Create with defaults for required fields */ export declare class NotificationsRepository extends BaseRepository { constructor(db: DatabaseServiceInterface); /** * Create repository instance. * Uses DbService singleton. */ static create(): NotificationsRepository; /** * Find multiple entities with default sorting */ findMany(options?: QueryOptions, config?: OperationConfig): Promise>>; /** * Create new notification record with defaults * Domain service handles DTO → DbRow conversion via mapper before calling this */ create(data: Partial & Partial>, config?: OperationConfig): Promise>; /** * Find notifications by user ID */ findByUserId(userId: string, options?: { limit?: number; offset?: number; }): Promise>>; /** * Find notifications by channel */ findByChannel(channel: string, options?: { limit?: number; offset?: number; }): Promise>>; /** * Get table name (for BaseBackendDomainService compatibility) */ getTableName(): string; } //# sourceMappingURL=NotificationsRepository.d.ts.map