Files
superport_v2/lib/features/masters/group/domain/entities/group.dart
JiWoong Sul c3010965ad 결재 템플릿 단계 적용 구현
- ApprovalTemplate 엔티티·DTO·원격 리포지토리 추가
- ApprovalController에 템플릿 로딩/적용 상태와 assignSteps 호출 연동
- ApprovalPage 단계 탭에 템플릿 선택 UI 및 적용 확인 다이얼로그 구현
- 템플릿 적용 단위 테스트와 IMPLEMENTATION_TASKS 현황 갱신
2025-09-25 00:21:12 +09:00

94 lines
2.0 KiB
Dart

/// 그룹(권한 집합) 엔티티
///
/// - SRP: 그룹의 속성 정보만 표현한다.
/// - presentation/data 레이어의 구현 세부사항을 포함하지 않는다.
class Group {
Group({
this.id,
required this.groupName,
this.description,
this.isDefault = false,
this.isActive = true,
this.isDeleted = false,
this.note,
this.createdAt,
this.updatedAt,
});
/// PK (null 이면 신규 생성)
final int? id;
/// 그룹명
final String groupName;
/// 그룹 설명(선택)
final String? description;
/// 기본 그룹 여부
final bool isDefault;
/// 사용 여부
final bool isActive;
/// 삭제 여부(소프트 삭제)
final bool isDeleted;
/// 비고 메모
final String? note;
/// 타임스탬프
final DateTime? createdAt;
final DateTime? updatedAt;
Group copyWith({
int? id,
String? groupName,
String? description,
bool? isDefault,
bool? isActive,
bool? isDeleted,
String? note,
DateTime? createdAt,
DateTime? updatedAt,
}) {
return Group(
id: id ?? this.id,
groupName: groupName ?? this.groupName,
description: description ?? this.description,
isDefault: isDefault ?? this.isDefault,
isActive: isActive ?? this.isActive,
isDeleted: isDeleted ?? this.isDeleted,
note: note ?? this.note,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
);
}
}
/// 그룹 생성/수정 입력 모델
class GroupInput {
GroupInput({
required this.groupName,
this.description,
this.isDefault = false,
this.isActive = true,
this.note,
});
final String groupName;
final String? description;
final bool isDefault;
final bool isActive;
final String? note;
Map<String, dynamic> toPayload() {
return {
'group_name': groupName,
'description': description,
'is_default': isDefault,
'is_active': isActive,
'note': note,
};
}
}