주석화 진행상황 정리하고 핵심 모듈에 한글 주석 추가
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:superport_v2/core/common/utils/json_utils.dart';
|
||||
|
||||
import '../../domain/entities/group.dart';
|
||||
|
||||
/// 권한 그룹(Group) API 응답을 표현하는 DTO.
|
||||
class GroupDto {
|
||||
GroupDto({
|
||||
this.id,
|
||||
@@ -26,6 +27,7 @@ class GroupDto {
|
||||
final DateTime? createdAt;
|
||||
final DateTime? updatedAt;
|
||||
|
||||
/// JSON에서 그룹 정보를 파싱한다.
|
||||
factory GroupDto.fromJson(Map<String, dynamic> json) {
|
||||
return GroupDto(
|
||||
id: json['id'] as int?,
|
||||
@@ -40,6 +42,7 @@ class GroupDto {
|
||||
);
|
||||
}
|
||||
|
||||
/// DTO를 도메인 [Group] 엔티티로 변환한다.
|
||||
Group toEntity() => Group(
|
||||
id: id,
|
||||
groupName: groupName,
|
||||
@@ -52,6 +55,7 @@ class GroupDto {
|
||||
updatedAt: updatedAt,
|
||||
);
|
||||
|
||||
/// 페이징 응답을 [PaginatedResult]로 변환한다.
|
||||
static PaginatedResult<Group> parsePaginated(Map<String, dynamic>? json) {
|
||||
final rawItems = JsonUtils.extractList(json, keys: const ['items']);
|
||||
final items = rawItems
|
||||
@@ -67,6 +71,7 @@ class GroupDto {
|
||||
}
|
||||
}
|
||||
|
||||
/// 문자열/DateTime을 파싱해 [DateTime]으로 반환한다.
|
||||
DateTime? _parseDate(Object? value) {
|
||||
if (value == null) return null;
|
||||
if (value is DateTime) return value;
|
||||
|
||||
Reference in New Issue
Block a user