-
Notifications
You must be signed in to change notification settings - Fork 1
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 #9 from f-lab-edu/feature/job-posting-form
공고 등록 기능 PR
- Loading branch information
Showing
59 changed files
with
4,925 additions
and
117 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
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
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,27 @@ | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'api_response.freezed.dart'; | ||
|
||
part 'api_response.g.dart'; | ||
|
||
@freezed | ||
class ApiResponse<T> with _$ApiResponse<T> { | ||
const factory ApiResponse.success(T data) = _Success<T>; | ||
|
||
const factory ApiResponse.fail(FailResponse failResponse) = _Fail; | ||
|
||
const factory ApiResponse.error() = _Error; | ||
} | ||
|
||
@freezed | ||
abstract class FailResponse with _$FailResponse { | ||
const factory FailResponse({ | ||
required int status, | ||
required String error, | ||
required String message, | ||
required String devMessage, | ||
}) = _FailResponse; | ||
|
||
factory FailResponse.fromJson(Map<String, dynamic> json) => | ||
_$FailResponseFromJson(json); | ||
} |
Oops, something went wrong.