-
Notifications
You must be signed in to change notification settings - Fork 0
Notificationテーブルのスキーマ変更 #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d5d945b
Update OpenAPI schema from dotto-typespec
kantacky 4b62a77
生成コードを最新の OpenAPI スキーマに追従
kantacky e976572
Notification API 変換を targetUsers 形式に更新
kantacky d047f40
Notification の通知済みフラグを対象ユーザー単位の NotifiedAt に移行
kantacky 447fc43
Merge remote-tracking branch 'origin/main' into update-db-schema
kantacky 90d67c4
Notification 配信成功ユーザーのみを NotifiedAt 記録対象にする
kantacky 5dbcbbb
fix(repository): isNotified フィルタの OR 句を括弧でグループ化
kantacky 3fbdef8
fix(repository): 通知済みユーザーの notified_at を上書きしない
kantacky e840b9d
fix(repository): 0件更新の通知IDを Dispatch 結果に含めない
kantacky e8129b0
fix(repository): UpdateNotification で対象行を SELECT ... FOR UPDATE してレースを防ぐ
kantacky 302d158
fix(service): FCM トークン未登録ユーザーも notifiedAt を埋めて再ディスパッチを止める
kantacky 3af4972
fix(service): トークン混在時もFCM未登録ユーザーの notifiedAt を更新する
kantacky 0011fad
perf(repository): DispatchNotifications を 1 回の UPDATE ... RETURNING に…
kantacky 5b18f82
fix(service): FCM 送信失敗ログに部分成功の件数を明示する
kantacky ff3b981
perf(repository): DispatchNotifications を UNNEST + JOIN でパラメータ数を一定に保つ
kantacky 1a4eab0
revert(repository): DispatchNotifications を通知ID単位の UPDATE 実装へ戻す
kantacky 7712e63
fix(repository): DispatchNotifications で通知済みユーザーの notified_at も上書きする
kantacky 9041182
fix(service): DispatchNotifications で通知済みユーザーも再送対象に含める
kantacky 36cdec1
refactor(service): NotificationService の messagingClient を interface 化する
kantacky 53411f4
test(service): DispatchNotifications のユニットテストを追加する
kantacky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| package database | ||
|
|
||
| import "time" | ||
|
|
||
| type NotificationTargetUser struct { | ||
| NotificationID string `gorm:"type:text;primaryKey"` | ||
| UserID string `gorm:"type:text;primaryKey"` | ||
| NotifiedAt *time.Time `gorm:"type:timestamptz;index"` | ||
| Notification Notification `gorm:"constraint:OnDelete:CASCADE"` | ||
| User User `gorm:"constraint:OnDelete:CASCADE"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.