Skip to content

[Feat/user device token] - 알림을 위한 디바이스 토큰수집#104

Merged
ekgns33 merged 10 commits intomainfrom
feat/user-device-token
Jun 27, 2025
Merged

[Feat/user device token] - 알림을 위한 디바이스 토큰수집#104
ekgns33 merged 10 commits intomainfrom
feat/user-device-token

Conversation

@ekgns33
Copy link
Contributor

@ekgns33 ekgns33 commented Jun 25, 2025

작업 내역

디바이스 토큰 엔티티 추가

  • UserDeviceToken 엔티티 추가 : 2acf56c
  • src/resources/sql/schema.sql 수정

하위 호환성

  • 기존 회원가입 API에서 토큰 필드 추가 (nullable) : 9298972
  • 토큰 존재 시 저장 로직 작성
  • 테스트 코드 작성

리뷰해주세요

  • Entity 컬럼명 확인해주세요
  • 회의에서 이야기했던 방향대로 user_token 테이블에 상태 컬럼을 두었어요! 확인부탁드립니다

Summary by CodeRabbit

  • New Features
    • Added support for registering device tokens and specifying device platforms (FCM or APNS) during user signup.
    • Device tokens are now stored and managed for each user, enabling improved notification handling.
  • Bug Fixes
    • Signup now validates that a device platform is provided if a device token is submitted, returning an error otherwise.
  • Database
    • Updated the user token table schema to include device platform, notification settings, and usage timestamps.
  • Tests
    • Enhanced test coverage for signup scenarios involving device tokens and platforms, including validation and error cases.

@ekgns33 ekgns33 requested a review from jeeheaG June 25, 2025 01:29
@ekgns33 ekgns33 self-assigned this Jun 25, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 25, 2025

Warning

Rate limit exceeded

@ekgns33 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 0 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 26b421f and 6b20ce0.

📒 Files selected for processing (3)
  • src/test/java/org/runimo/runimo/auth/service/SignUpUsecaseTest.java (3 hunks)
  • src/test/java/org/runimo/runimo/rewards/RewardTest.java (2 hunks)
  • src/test/java/org/runimo/runimo/user/api/UserItemAcceptanceTest.java (2 hunks)

Walkthrough

This update introduces device token and platform support during user registration. It adds new fields and validation to the signup request, creates a new DevicePlatform enum and UserDeviceToken entity, and updates the schema to store device token data. The service and DTO layers are extended to process and persist device token information. Comprehensive tests were added to validate these changes.

Changes

File(s) Change Summary
.../auth/controller/request/AuthSignupRequest.java Converted from record to class with Lombok, added deviceToken and devicePlatform fields, validation logic, and updated method signatures.
.../auth/service/SignUpUsecaseImpl.java Refactored to use a helper for mapping device token info into user registration command.
.../auth/service/dto/UserSignupCommand.java Added deviceToken and devicePlatform fields to the record.
.../user/domain/DevicePlatform.java Introduced new enum DevicePlatform with FCM, APNS, and NONE values and a parsing helper.
.../user/domain/UserDeviceToken.java Added new JPA entity for device tokens, including fields for platform, notification, timestamps, and soft deletion.
.../user/repository/UserDeviceTokenRepository.java Added Spring Data JPA repository interface for UserDeviceToken.
.../user/service/UserCreator.java Added method to create and persist UserDeviceToken for a user.
.../user/service/UserRegisterService.java Calls new device token creation logic during user registration.
.../user/service/dto/command/DeviceTokenDto.java Added new record to encapsulate device token and platform, with helpers and singleton empty instance.
.../user/service/dto/command/UserRegisterCommand.java Added DeviceTokenDto field to registration command record.
.../resources/sql/schema.sql
.../test/resources/sql/schema.sql
Updated user_token table: added primary key, platform, notification, last used, and reordered columns.
.../auth/controller/AuthAcceptanceTest.java Added tests for signup with device token/platform, missing platform, and APNS platform; improved teardown and helper methods.
.../auth/controller/AuthControllerTest.java Added controller tests for signup scenarios with/without device token and platform, and error handling.
.../auth/service/SignUpUsecaseTest.java Updated tests to include device token and platform parameters in signup command creation.
.../user/service/usecases/UserRegisterServiceTest.java Updated user registration test to include device token DTO parameter.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant AuthController
    participant SignUpUsecaseImpl
    participant UserRegisterService
    participant UserCreator
    participant UserDeviceTokenRepository

    Client->>AuthController: POST /signup (registerToken, nickname, deviceToken, devicePlatform)
    AuthController->>SignUpUsecaseImpl: register(AuthSignupRequest)
    SignUpUsecaseImpl->>UserRegisterService: registerUser(UserRegisterCommand)
    UserRegisterService->>UserCreator: createUser(...)
    UserRegisterService->>UserCreator: createUserDeviceToken(user, DeviceTokenDto)
    UserCreator->>UserDeviceTokenRepository: save(UserDeviceToken)
    UserRegisterService-->>SignUpUsecaseImpl: User created
    SignUpUsecaseImpl-->>AuthController: SignupUserResponse
    AuthController-->>Client: HTTP 201 Created
Loading

Suggested reviewers

  • jeeheaG

Poem

In fields of code where rabbits dwell,
Device tokens now are stored as well.
Platforms FCM or APNS,
Hop into tables, neat and dense.
With tests that check each rabbit trail,
This signup flow will never fail!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🔭 Outside diff range comments (1)
src/test/resources/sql/schema.sql (1)

217-218: Remove duplicate foreign key constraint.

The foreign key constraint for user_token.user_id is already defined in the table creation (line 51). This duplicate constraint will cause a SQL error.

Remove the duplicate constraint:

-ALTER TABLE `user_token`
-    ADD FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
-
🧹 Nitpick comments (4)
src/main/java/org/runimo/runimo/user/repository/UserDeviceTokenRepository.java (1)

8-10: Consider adding custom query methods for device token management.

The repository interface is correctly implemented but could benefit from common query methods for device token operations.

Consider adding these useful query methods:

 @Repository
 public interface UserDeviceTokenRepository extends JpaRepository<UserDeviceToken, Long> {
-
+    List<UserDeviceToken> findByUserId(Long userId);
+    List<UserDeviceToken> findByUserIdAndPlatform(Long userId, DevicePlatform platform);
+    Optional<UserDeviceToken> findByDeviceToken(String deviceToken);
+    List<UserDeviceToken> findByUserIdAndNotificationAllowedTrue(Long userId);
 }
src/main/java/org/runimo/runimo/user/service/UserCreator.java (1)

56-68: Consider making notification preference configurable.

The implementation is correct and follows good practices with the early return and transaction annotation. However, the hardcoded notificationAllowed(true) might not be flexible enough for future requirements.

Consider making the notification preference configurable:

-    public void createUserDeviceToken(User user, DeviceTokenDto deviceTokenDto) {
+    public void createUserDeviceToken(User user, DeviceTokenDto deviceTokenDto, boolean notificationAllowed) {
         if (deviceTokenDto.isEmpty()) {
             return;
         }
         UserDeviceToken userDeviceToken = UserDeviceToken.builder()
             .user(user)
             .deviceToken(deviceTokenDto.token())
             .platform(deviceTokenDto.platform())
-            .notificationAllowed(true)
+            .notificationAllowed(notificationAllowed)
             .build();
         userDeviceTokenRepository.save(userDeviceToken);
     }

Alternatively, add the notification preference to DeviceTokenDto if it should come from the client.

src/main/java/org/runimo/runimo/auth/controller/request/AuthSignupRequest.java (2)

47-49: Consider using a more specific exception type.

While the validation logic is correct, consider using a more specific exception type like ValidationException or creating a custom exception for better error handling and API consistency.

-        if (hasDeviceToken() && (devicePlatform == null || devicePlatform.trim().isEmpty())) {
-            throw new IllegalArgumentException("디바이스 토큰이 있으면 플랫폼도 필수입니다.");
-        }
+        if (hasDeviceToken() && (devicePlatform == null || devicePlatform.trim().isEmpty())) {
+            throw new ValidationException("디바이스 토큰이 있으면 플랫폼도 필수입니다.");
+        }

60-62: Simplify the helper method for better readability.

The hasDeviceToken() method can be simplified while maintaining the same functionality.

-    private boolean hasDeviceToken() {
-        return deviceToken != null && !deviceToken.trim().isEmpty();
-    }
+    private boolean hasDeviceToken() {
+        return deviceToken != null && !deviceToken.isBlank();
+    }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9aa4fb8 and c23dc5a.

📒 Files selected for processing (14)
  • src/main/java/org/runimo/runimo/auth/controller/request/AuthSignupRequest.java (1 hunks)
  • src/main/java/org/runimo/runimo/auth/service/SignUpUsecaseImpl.java (3 hunks)
  • src/main/java/org/runimo/runimo/auth/service/dto/UserSignupCommand.java (1 hunks)
  • src/main/java/org/runimo/runimo/user/domain/DevicePlatform.java (1 hunks)
  • src/main/java/org/runimo/runimo/user/domain/UserDeviceToken.java (1 hunks)
  • src/main/java/org/runimo/runimo/user/repository/UserDeviceTokenRepository.java (1 hunks)
  • src/main/java/org/runimo/runimo/user/service/UserCreator.java (3 hunks)
  • src/main/java/org/runimo/runimo/user/service/UserRegisterService.java (1 hunks)
  • src/main/java/org/runimo/runimo/user/service/dto/command/DeviceTokenDto.java (1 hunks)
  • src/main/java/org/runimo/runimo/user/service/dto/command/UserRegisterCommand.java (1 hunks)
  • src/main/resources/sql/schema.sql (1 hunks)
  • src/test/java/org/runimo/runimo/auth/controller/AuthAcceptanceTest.java (2 hunks)
  • src/test/java/org/runimo/runimo/auth/controller/AuthControllerTest.java (3 hunks)
  • src/test/resources/sql/schema.sql (1 hunks)
🔇 Additional comments (21)
src/main/java/org/runimo/runimo/user/domain/UserDeviceToken.java (2)

51-58: Missing status column mentioned in PR objectives.

The PR objectives mention adding a status column to the user_token table, but this entity doesn't include a status field. Please verify if this is intentional or if the status column should be added.

#!/bin/bash
# Check if status column exists in the database schema
rg -A 10 -B 5 "user_token" src/main/resources/sql/schema.sql src/test/resources/sql/schema.sql

32-34: Let’s confirm whether a status field is defined in this entity:

#!/bin/bash
grep -n "status" src/main/java/org/runimo/runimo/user/domain/UserDeviceToken.java || echo "No status field found"
src/main/java/org/runimo/runimo/user/service/UserRegisterService.java (1)

29-29: LGTM! Device token creation is properly integrated.

The call to createUserDeviceToken is correctly placed after user creation and uses the appropriate parameters from the registration command.

src/main/java/org/runimo/runimo/user/service/dto/command/UserRegisterCommand.java (1)

13-13: LGTM! Device token field properly added for backward compatibility.

The DeviceTokenDto deviceToken field is correctly added as optional (no @NotNull annotation), which maintains backward compatibility with existing registration flows.

src/main/java/org/runimo/runimo/auth/service/dto/UserSignupCommand.java (2)

4-4: LGTM!

The import for DevicePlatform is correctly added to support the new field.


12-14: LGTM!

The device token fields are appropriately added to the record. The field types and positioning are consistent with the existing pattern.

src/main/java/org/runimo/runimo/user/service/UserCreator.java (1)

8-8: LGTM!

The new imports and repository dependency are correctly added to support device token functionality.

Also applies to: 11-11, 13-13, 25-25

src/main/java/org/runimo/runimo/auth/service/SignUpUsecaseImpl.java (3)

22-22: LGTM!

The import for DeviceTokenDto is correctly added to support the new device token mapping functionality.


47-48: LGTM!

Good refactoring to extract the command mapping logic into a separate method, improving code readability and maintainability.


78-88: LGTM!

The extracted mapping method is well-implemented and follows good naming conventions. The use of DeviceTokenDto.of() suggests a clean factory method pattern.

src/test/resources/sql/schema.sql (2)

39-52: LGTM! Well-designed table structure for device token management.

The updated user_token table structure is comprehensive and well-designed:

  • Primary key id with auto-increment is appropriate
  • platform ENUM with FCM/APNS options covers major mobile platforms
  • notification_allowed boolean with TRUE default enables opt-out functionality
  • last_used_at timestamp supports token lifecycle management
  • Soft deletion support with deleted_at column

44-44: Verify the default platform value choice.

The default platform is set to 'APNS' (Apple Push Notification Service). Verify that this default makes sense for your user base, or consider if it should be 'FCM' (Firebase Cloud Messaging) which supports both Android and iOS.

Consider the platform distribution of your users to determine the most appropriate default value.

src/main/resources/sql/schema.sql (1)

40-51: Well-designed schema update for device token management.

The user_token table restructuring looks solid with these improvements:

  • Primary key addition enables proper JPA entity mapping
  • Platform ENUM with FCM/APNS values provides clear device type distinction
  • notification_allowed flag gives users control over push notifications
  • last_used_at timestamp enables token lifecycle management and cleanup

The default values are appropriate (APNS default, notifications enabled by default).

src/test/java/org/runimo/runimo/auth/controller/AuthControllerTest.java (3)

150-170: Good test coverage for backward compatibility.

This test appropriately verifies that signup works without device tokens, ensuring backward compatibility with older app versions.


172-184: Effective validation test for incomplete device token data.

The test correctly verifies that providing a device token without specifying the platform results in a 400 Bad Request response, which aligns with the validation logic in AuthSignupRequest.toUserSignupCommand().


186-206: Comprehensive test for complete device token functionality.

This test validates the full happy path with both device token and platform provided, correctly expecting a 201 Created response.

src/main/java/org/runimo/runimo/auth/controller/request/AuthSignupRequest.java (2)

16-21: Good choice using Lombok to reduce boilerplate code.

The conversion from record to class with Lombok annotations maintains readability while providing the flexibility needed for the new optional fields.


34-44: Well-designed backward compatibility approach.

The addition of optional deviceToken and devicePlatform fields with a backward-compatible constructor ensures existing clients continue to work while enabling new functionality.

src/test/java/org/runimo/runimo/auth/controller/AuthAcceptanceTest.java (3)

164-179: Comprehensive acceptance test for device token functionality.

This test provides good end-to-end validation of the device token signup flow, verifying the complete request-response cycle.


181-193: Effective validation test for incomplete device token data.

This acceptance test correctly validates the server's response when device token is provided without a platform, ensuring proper API validation behavior.


209-211: Good use of helper method to reduce code duplication.

The buildSignupRequest helper method follows the DRY principle and makes the tests more maintainable by centralizing the request creation logic.

Comment on lines +8 to +10
public static DevicePlatform fromString(String value) {
return DevicePlatform.valueOf(value.toUpperCase());
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add null safety to the fromString method.

The method will throw a NullPointerException if a null string is passed, since it calls toUpperCase() on the input without null checking.

 public static DevicePlatform fromString(String value) {
+    if (value == null) {
+        throw new IllegalArgumentException("Device platform value cannot be null");
+    }
     return DevicePlatform.valueOf(value.toUpperCase());
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public static DevicePlatform fromString(String value) {
return DevicePlatform.valueOf(value.toUpperCase());
}
public static DevicePlatform fromString(String value) {
if (value == null) {
throw new IllegalArgumentException("Device platform value cannot be null");
}
return DevicePlatform.valueOf(value.toUpperCase());
}
🤖 Prompt for AI Agents
In src/main/java/org/runimo/runimo/user/domain/DevicePlatform.java around lines
8 to 10, the fromString method lacks null safety and will throw a
NullPointerException if a null value is passed. Add a null check at the start of
the method to handle null inputs gracefully, either by returning null, throwing
a custom exception, or handling it according to the application's requirements
before calling toUpperCase().

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/test/java/org/runimo/runimo/user/service/usecases/UserRegisterServiceTest.java (1)

43-43: Update test method name to reflect expanded functionality.

The test method name "회원가입_알_지급_테스트" (user registration egg distribution test) should be updated to reflect that it now also tests device token functionality.

Consider renaming to something like:

-void 회원가입_알_지급_테스트() {
+void 회원가입_디바이스토큰_알_지급_테스트() {

or

-void 회원가입_알_지급_테스트() {
+void 디바이스토큰_포함_회원가입_테스트() {
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c23dc5a and b76ae79.

📒 Files selected for processing (1)
  • src/test/java/org/runimo/runimo/user/service/usecases/UserRegisterServiceTest.java (2 hunks)
🔇 Additional comments (1)
src/test/java/org/runimo/runimo/user/service/usecases/UserRegisterServiceTest.java (1)

16-16: Import statements correctly added for new device token functionality.

The imports for DevicePlatform and DeviceTokenDto are properly added to support the updated test.

Also applies to: 23-23

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/test/java/org/runimo/runimo/auth/service/SignUpUsecaseTest.java (1)

85-86: Consider adding device token handling verification.

The parameter updates are correct and consistent across both test methods. However, these tests don't verify that the device token is being processed correctly by the service. Consider adding assertions to validate that:

  1. The device token is passed to the underlying service correctly
  2. Different device platforms are handled appropriately
  3. Null device token scenarios are tested

For example, you could add verification that the userRegisterService.registerUser() is called with the correct device token information:

 when(userRegisterService.registerUser(any())).thenReturn(UserFixtures.getUserWithId(1L));
+
+// Verify device token is passed correctly
+verify(userRegisterService).registerUser(argThat(command -> 
+    "device_token".equals(command.deviceToken()) && 
+    DevicePlatform.APNS.equals(command.devicePlatform())
+));

Would you like me to help create additional test methods to cover different device token scenarios?

Also applies to: 115-116

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b76ae79 and 26b421f.

📒 Files selected for processing (3)
  • src/main/java/org/runimo/runimo/user/domain/DevicePlatform.java (1 hunks)
  • src/main/java/org/runimo/runimo/user/service/dto/command/DeviceTokenDto.java (1 hunks)
  • src/test/java/org/runimo/runimo/auth/service/SignUpUsecaseTest.java (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main/java/org/runimo/runimo/user/domain/DevicePlatform.java
  • src/main/java/org/runimo/runimo/user/service/dto/command/DeviceTokenDto.java
🔇 Additional comments (1)
src/test/java/org/runimo/runimo/auth/service/SignUpUsecaseTest.java (1)

28-28: LGTM: Import addition is correct.

The import for DevicePlatform enum is necessary to support the updated test method signatures.

@ekgns33 ekgns33 force-pushed the feat/user-device-token branch from 26b421f to 6b20ce0 Compare June 25, 2025 01:38
@ekgns33
Copy link
Contributor Author

ekgns33 commented Jun 25, 2025

  • 누락된 테스트코드 변경 추가
  • DeviceTokenDto 생성과정에서 Platform에 대한 validation 추가

@sonarqubecloud
Copy link

Copy link
Contributor

@jeeheaG jeeheaG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

알림에 대해 정리하면
알림 약관 동의가 필수이고
알림 약관 동의 시 토큰 발급(따라서 모든 회원의 토큰 존재),
알림 수신 on/off 에 따라 토큰 테이블에 notificationAllowed 값이 바뀌는 거 맞을까요?

private Boolean notificationAllowed;

@Column(name = "last_used_at")
private LocalDateTime lastUsedAt;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거는 언제 필요한 정보일까요? 기록용일까요

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최근 알림 지표로 삼을 것 같아서 추가했어요! 알림 대상 테이블은 빠르게 수가 증가할 것 같아서 디바이스토큰에 넣었습니다.

@ekgns33
Copy link
Contributor Author

ekgns33 commented Jun 27, 2025

고생하셨습니다!

알림에 대해 정리하면 알림 약관 동의가 필수이고 알림 약관 동의 시 토큰 발급(따라서 모든 회원의 토큰 존재), 알림 수신 on/off 에 따라 토큰 테이블에 notificationAllowed 값이 바뀌는 거 맞을까요?

  • 네 맞습니다 :)

@ekgns33 ekgns33 merged commit 495a3a0 into main Jun 27, 2025
4 checks passed
@ekgns33 ekgns33 deleted the feat/user-device-token branch June 27, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants