Line data Source code
1 : // 역할 옵션
2 : const Map<String, String> roleOptions = {
3 : 'admin': '관리자',
4 : 'clubadmin': '클럽 관리자',
5 : 'user': '일반 사용자',
6 : };
7 :
8 : // 성별 옵션
9 : const Map<String, String> genderOptions = {
10 : 'male': '남성',
11 : 'female': '여성',
12 : };
13 :
14 : // 회원 유형 옵션
15 : const Map<String, String> memberTypeOptions = {
16 : 'regular': '정회원',
17 : 'associate': '준회원',
18 : 'guest': '게스트',
19 : 'manager': '운영진',
20 : 'owner': '모임장',
21 : };
22 :
23 : // 상태 옵션
24 : const Map<String, String> statusOptions = {
25 : 'active': '활성',
26 : 'inactive': '비활성',
27 : 'suspended': '정지',
28 : 'deleted': '삭제',
29 : };
30 :
31 : // 참가자 상태 옵션
32 : const Map<String, String> participantStatusOptions = {
33 : 'pending': '참가예정',
34 : 'confirmed': '참가확정',
35 : 'canceled': '취소',
36 : };
37 :
38 : // 이벤트 상태 옵션
39 : const Map<String, String> eventStatusOptions = {
40 : 'ready': '준비',
41 : 'active': '활성',
42 : 'completed': '완료',
43 : 'canceled': '취소',
44 : 'deleted': '삭제',
45 : };
46 :
47 : // 이벤트 유형 옵션
48 : const Map<String, String> eventTypeOptions = {
49 : 'regular': '정기전',
50 : 'exchange': '교류전',
51 : 'tournament': '토너먼트',
52 : 'lightning': '번개',
53 : 'friendly': '친선전',
54 : 'other': '기타',
55 : };
56 :
57 : // 결제 상태 옵션
58 : const Map<String, String> paymentStatusOptions = {
59 : 'unpaid': '미납',
60 : 'paid': '납부완료',
61 : };
62 :
63 : // 평균 산정 기준 옵션
64 : const Map<String, String> averageCalculationPeriodOptions = {
65 : 'total': '전체',
66 : '1year': '최근 1년',
67 : '6month': '최근 6개월',
68 : '3month': '최근 3개월',
69 : 'firsthalf': '상반기',
70 : 'secondhalf': '하반기',
71 : 'quarterly': '분기별',
72 : };
73 :
74 : // 회원 유형 레이블 가져오기
75 0 : String getMemberTypeLabel(String? memberType) {
76 : if (memberType == null) return '일반 회원';
77 0 : return memberTypeOptions[memberType] ?? memberType;
78 : }
79 :
80 : // 역할 레이블 가져오기
81 0 : String getRoleLabel(String? role) {
82 : if (role == null) return '일반 사용자';
83 0 : return roleOptions[role] ?? role;
84 : }
85 :
86 : // 성별 레이블 가져오기
87 0 : String getGenderLabel(String? gender) {
88 : if (gender == null) return '정보 없음';
89 0 : return genderOptions[gender] ?? gender;
90 : }
91 :
92 : // 상태 레이블 가져오기
93 0 : String getStatusLabel(String? status) {
94 : if (status == null) return '정보 없음';
95 0 : return statusOptions[status] ?? status;
96 : }
97 :
98 : // 이벤트 상태 레이블 가져오기
99 0 : String getEventStatusLabel(String? status) {
100 : if (status == null) return '정보 없음';
101 0 : return eventStatusOptions[status] ?? status;
102 : }
103 :
104 : // 이벤트 유형 레이블 가져오기
105 0 : String getEventTypeLabel(String? type) {
106 : if (type == null) return '기타';
107 0 : return eventTypeOptions[type] ?? type;
108 : }
109 :
110 :
|