create submission
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
/// Repository interface for project submissions operations.
|
||||
library;
|
||||
|
||||
import 'package:worker/features/projects/data/models/project_submission_request.dart';
|
||||
import 'package:worker/features/projects/domain/entities/project_progress.dart';
|
||||
import 'package:worker/features/projects/domain/entities/project_status.dart';
|
||||
import 'package:worker/features/projects/domain/entities/project_submission.dart';
|
||||
|
||||
@@ -20,9 +22,32 @@ abstract class SubmissionsRepository {
|
||||
bool forceRefresh = false,
|
||||
});
|
||||
|
||||
/// Get list of construction progress stages
|
||||
///
|
||||
/// Uses cache-first pattern:
|
||||
/// - Returns cached data if available
|
||||
/// - Fetches from API and updates cache
|
||||
/// - [forceRefresh] bypasses cache and fetches fresh data
|
||||
Future<List<ProjectProgress>> getProjectProgressList({
|
||||
bool forceRefresh = false,
|
||||
});
|
||||
|
||||
/// Get all project submissions for the current user
|
||||
Future<List<ProjectSubmission>> getSubmissions({
|
||||
int limitStart = 0,
|
||||
int limitPageLength = 0,
|
||||
});
|
||||
|
||||
/// Save (create/update) a project submission
|
||||
/// Returns the project name (ID) from the API response
|
||||
Future<String> saveSubmission(ProjectSubmissionRequest request);
|
||||
|
||||
/// Upload a file for a project submission
|
||||
/// [projectName] is the project ID returned from saveSubmission
|
||||
/// [filePath] is the local path to the file
|
||||
/// Returns the uploaded file URL
|
||||
Future<String> uploadProjectFile({
|
||||
required String projectName,
|
||||
required String filePath,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user