FPI 사용자·국가 랭킹 서버 집계 · YouTube 스밍 · Music Shake 참여

This commit is contained in:
Sn-Kinos
2026-10-05 17:49:47 +09:00
parent 5238fc4ef3
commit 96a95a12d1
31 changed files with 738 additions and 116 deletions
+13 -15
View File
@@ -60,7 +60,8 @@ enum QuestType {
/// 안에서만 참여를 받는다. 판정 시각은 서버 시각이다(`fn-quest-timeattack`).
timeAttack,
/// 스밍·YouTube. 별첨 B 「1차 별도 완청 보상형 Quest 없음」 + Q-QC-04 회신 대기.
/// 스밍·YouTube — 무보상 기본 참여(원장 C-04 · B-25, 9/16 확정). POP 지급 없이 참여 기록과
/// FPI 원천만 남는다(`fn-quest-stream-participate`).
streaming,
/// 사용자 생성 Vote · SNS — 인증 자료 제출 → 생성자 · 운영자 검토(원장 C-08 · C-10).
@@ -109,6 +110,8 @@ enum QuestType {
/// `quests.rewardPop` 을 보지 않는다. 그래서 출석만 운영값을 읽는다. 운영값이
/// 없으면 null — 숫자를 지어내지 않고 화면이 중립 문구를 쓴다.
int? rewardFrom(Map<String, dynamic> quest, Map<String, dynamic> policy) {
// 시청 · 스트리밍은 무보상 참여다(C-04) — 문서 값과 무관하게 0.
if (this == QuestType.streaming) return 0;
final raw = this == QuestType.attend
? policy['attendPop']
: quest['rewardPop'];
@@ -117,19 +120,13 @@ enum QuestType {
/// 앱이 서버 검증까지 태울 수 있는 유형인가.
///
/// [musicShake] 와 [streaming] 은 Q-QC-04 회신 대기라 참여를 열지 않는다
/// (해석 확인 요청서 8.1 보류 범위). [unknown] 은 판정 함수를 모른다.
/// [streaming] 은 무보상 참여(C-04), [musicShake] 는 BPM 구간 판정(B-24 · `fn-quest-verify-music-shake`)으로
/// 연다(Q-QC-04 9/16 회신). [unknown] 은 판정 함수를 모른다.
/// 내부 사유(질의 번호 등)는 화면에 내보내지 않는다 — 사용자에게는 한 문구다.
bool get verifiable => switch (this) {
QuestType.attend ||
QuestType.steps ||
QuestType.place ||
QuestType.timeAttack ||
QuestType.vote ||
QuestType.sns ||
QuestType.community => true,
QuestType.musicShake || QuestType.streaming || QuestType.unknown => false,
};
bool get verifiable => this != QuestType.unknown;
/// 시작 뒤 진행도를 모아야 판정할 수 있는 유형 — 걸음(누적 걸음) · Music Shake(구간 판정).
bool get gathers => this == QuestType.steps || this == QuestType.musicShake;
/// 참여를 열지 않는 사유. 열려 있으면 null 이다.
String? get blockedReason =>
@@ -645,14 +642,15 @@ class SampleQuestRepository implements QuestRepository {
// 잠근 상태를 표본에서도 보여 준다.
const QuestCard(
id: 'q6',
title: '신곡 3분 완청',
title: '신곡 스트리밍 참여',
categoryName: '스트리밍',
type: QuestType.streaming,
author: QuestAuthor.admin,
stage: QuestStage.notStarted,
goal: 1,
progress: 0,
rewardPop: 10,
// 무보상 기본 참여(C-04).
rewardPop: 0,
participants: 3420,
),
];