-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from canopas/Mayank/cotnact-support
Add Contact support
- Loading branch information
Showing
19 changed files
with
1,380 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'support_models.freezed.dart'; | ||
|
||
part 'support_models.g.dart'; | ||
|
||
@freezed | ||
class AddSupportCaseRequest with _$AddSupportCaseRequest { | ||
const factory AddSupportCaseRequest({ | ||
String? id, | ||
required String title, | ||
String? description, | ||
@Default([]) List<String> attachmentUrls, | ||
required String userId, | ||
required DateTime createdAt, | ||
}) = _AddSupportCaseRequest; | ||
|
||
factory AddSupportCaseRequest.fromJson(Map<String, dynamic> json) => | ||
_$AddSupportCaseRequestFromJson(json); | ||
} | ||
|
||
enum AttachmentUploadStatus { | ||
uploading, | ||
uploaded; | ||
|
||
bool get isUploading => this == uploading; | ||
|
||
bool get isUploaded => this == uploaded; | ||
} | ||
|
||
@freezed | ||
class Attachment with _$Attachment { | ||
const factory Attachment({ | ||
required String path, | ||
String? url, | ||
@Default('') String name, | ||
@Default(AttachmentUploadStatus.uploading) | ||
AttachmentUploadStatus uploadStatus, | ||
}) = _Attachment; | ||
} |
Oops, something went wrong.