-
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 #11 from f-lab-edu/feature/5-job-posting-close
[#5] 공고 마감 기능 구현
- Loading branch information
Showing
66 changed files
with
1,315 additions
and
486 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
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 |
---|---|---|
@@ -1,18 +1,31 @@ | ||
// 공고 상태 타입 | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
import 'package:withu_app/core/core.dart'; | ||
|
||
@JsonEnum(valueField: 'serverKey') | ||
enum JobPostingStatusType with L10nKeyProvider { | ||
none(l10nKey: '', serverKey: ''), | ||
|
||
/// 임시저장 | ||
temporary(l10nKey: 'temporarySave'), | ||
temporary(l10nKey: 'temporarySave', serverKey: 'TEMPORARY'), | ||
|
||
/// 진행 | ||
inProgress(l10nKey: 'inProgress'), | ||
inProgress(l10nKey: 'inProgress', serverKey: 'IN_PROGRESS'), | ||
|
||
/// 마감 | ||
closed(l10nKey: 'closed'); | ||
closed(l10nKey: 'closed', serverKey: 'CLOSED'); | ||
|
||
@override | ||
final String l10nKey; | ||
|
||
const JobPostingStatusType({required this.l10nKey}); | ||
final String serverKey; | ||
|
||
const JobPostingStatusType({ | ||
required this.l10nKey, | ||
required this.serverKey, | ||
}); | ||
|
||
/// None을 제외한 값들 | ||
static List<JobPostingStatusType> get valuesWithoutNone => | ||
values.where((type) => type != none).toList(); | ||
} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export 'l10n_key_provider.dart'; | ||
export 'translatable.dart'; |
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,8 @@ | ||
import 'package:easy_localization/easy_localization.dart' as easy; | ||
|
||
/// Localization | ||
mixin Translatable { | ||
String get path; | ||
|
||
String get tr => easy.tr('$path$this'); | ||
} |
23 changes: 23 additions & 0 deletions
23
lib/core/utils/resource/job_posting_validation_message.dart
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,23 @@ | ||
import 'package:withu_app/core/core.dart'; | ||
|
||
/// 공고 관리 유효성 검사 메시지 | ||
enum JobPostingValidationMessage with Translatable { | ||
title, | ||
content, | ||
category, | ||
contractType, | ||
contractStartDate, | ||
contractEndDate, | ||
workStartTime, | ||
workEndTime, | ||
participants, | ||
payType, | ||
payAmount, | ||
address, | ||
preferredQualification, | ||
travelTimePaid, | ||
breakTimePaid; | ||
|
||
@override | ||
String get path => 'validationMessage.jobPosting.'; | ||
} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export 'string_res.dart'; | ||
export 'job_posting_validation_message.dart'; |
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
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 @@ | ||
export 'validation_result.dart'; |
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,28 @@ | ||
/// 유효성 검사 결과 | ||
class ValidationResult { | ||
/// 유효성 여부 | ||
final bool isValid; | ||
|
||
/// 유효성 검사 실패 메시지 | ||
final String failMessage; | ||
|
||
ValidationResult({ | ||
required this.isValid, | ||
this.failMessage = '', | ||
}); | ||
|
||
/// 검사 성공 | ||
factory ValidationResult.success() { | ||
return ValidationResult(isValid: true); | ||
} | ||
|
||
/// 검사 실패 | ||
factory ValidationResult.fail({ | ||
required String message, | ||
}) { | ||
return ValidationResult( | ||
isValid: false, | ||
failMessage: message, | ||
); | ||
} | ||
} |
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 @@ | ||
export 'data/data.dart'; |
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 @@ | ||
export 'data_sources/data_sources.dart'; |
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 @@ | ||
export 'dto/dto.dart'; |
23 changes: 23 additions & 0 deletions
23
lib/feature/company/data/data_sources/dto/base/company_dto.dart
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,23 @@ | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'company_dto.freezed.dart'; | ||
|
||
part 'company_dto.g.dart'; | ||
|
||
part 'company_dto.mock.dart'; | ||
|
||
/// 회사 상세 모델 | ||
@freezed | ||
class CompanyDto with _$CompanyDto { | ||
const factory CompanyDto({ | ||
required String id, // ID | ||
required String thumbnailUrl, // 썸네일 이미지 | ||
required String name, // 회사명 | ||
}) = _CompanyDto; | ||
|
||
factory CompanyDto.fromJson(Map<String, Object?> json) => | ||
_$CompanyDtoFromJson(json); | ||
|
||
/// Mock 데이터 생성 | ||
factory CompanyDto.mock() => CompanyDtoMock.mock(); | ||
} |
Oops, something went wrong.