주석화 진행상황 정리하고 핵심 모듈에 한글 주석 추가
This commit is contained in:
@@ -6,6 +6,7 @@ import '../../domain/entities/customer.dart';
|
||||
import '../../domain/repositories/customer_repository.dart';
|
||||
import '../dtos/customer_dto.dart';
|
||||
|
||||
/// 고객(API) CRUD를 호출하는 원격 저장소 구현체.
|
||||
class CustomerRepositoryRemote implements CustomerRepository {
|
||||
CustomerRepositoryRemote({required ApiClient apiClient}) : _api = apiClient;
|
||||
|
||||
@@ -13,6 +14,7 @@ class CustomerRepositoryRemote implements CustomerRepository {
|
||||
|
||||
static const _basePath = '/customers';
|
||||
|
||||
/// 고객 목록을 조회한다.
|
||||
@override
|
||||
Future<PaginatedResult<Customer>> list({
|
||||
int page = 1,
|
||||
@@ -37,6 +39,7 @@ class CustomerRepositoryRemote implements CustomerRepository {
|
||||
return CustomerDto.parsePaginated(response.data ?? const {});
|
||||
}
|
||||
|
||||
/// 고객을 생성한다.
|
||||
@override
|
||||
Future<Customer> create(CustomerInput input) async {
|
||||
final response = await _api.post<Map<String, dynamic>>(
|
||||
@@ -48,6 +51,7 @@ class CustomerRepositoryRemote implements CustomerRepository {
|
||||
return CustomerDto.fromJson(data).toEntity();
|
||||
}
|
||||
|
||||
/// 고객 정보를 수정한다.
|
||||
@override
|
||||
Future<Customer> update(int id, CustomerInput input) async {
|
||||
final response = await _api.patch<Map<String, dynamic>>(
|
||||
@@ -59,11 +63,13 @@ class CustomerRepositoryRemote implements CustomerRepository {
|
||||
return CustomerDto.fromJson(data).toEntity();
|
||||
}
|
||||
|
||||
/// 고객을 삭제한다.
|
||||
@override
|
||||
Future<void> delete(int id) async {
|
||||
await _api.delete<void>('$_basePath/$id');
|
||||
}
|
||||
|
||||
/// 삭제된 고객을 복구한다.
|
||||
@override
|
||||
Future<Customer> restore(int id) async {
|
||||
final response = await _api.post<Map<String, dynamic>>(
|
||||
|
||||
Reference in New Issue
Block a user