add
This commit is contained in:
@@ -3,24 +3,26 @@
|
||||
/// Repository interface for project submissions operations.
|
||||
library;
|
||||
|
||||
import 'package:worker/features/projects/domain/entities/project_status.dart';
|
||||
import 'package:worker/features/projects/domain/entities/project_submission.dart';
|
||||
|
||||
/// Submissions Repository
|
||||
///
|
||||
/// Defines contract for project submissions data operations.
|
||||
abstract class SubmissionsRepository {
|
||||
/// Get list of available project statuses
|
||||
///
|
||||
/// Uses cache-first pattern:
|
||||
/// - Returns cached data if available
|
||||
/// - Fetches from API and updates cache
|
||||
/// - [forceRefresh] bypasses cache and fetches fresh data
|
||||
Future<List<ProjectStatus>> getProjectStatusList({
|
||||
bool forceRefresh = false,
|
||||
});
|
||||
|
||||
/// Get all project submissions for the current user
|
||||
Future<List<ProjectSubmission>> getSubmissions();
|
||||
|
||||
/// Get a single submission by ID
|
||||
Future<ProjectSubmission> getSubmissionById(String submissionId);
|
||||
|
||||
/// Create a new project submission
|
||||
Future<ProjectSubmission> createSubmission(ProjectSubmission submission);
|
||||
|
||||
/// Update an existing submission
|
||||
Future<ProjectSubmission> updateSubmission(ProjectSubmission submission);
|
||||
|
||||
/// Delete a submission
|
||||
Future<void> deleteSubmission(String submissionId);
|
||||
Future<List<ProjectSubmission>> getSubmissions({
|
||||
int limitStart = 0,
|
||||
int limitPageLength = 0,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user