Repository navigation
会費の納入と役員の退任をイベントにする(#17) - #66
Merged
Merged
Conversation
- Membership::FeePayment(paid_on、record!)と OfficerTerm::Resignation(left_on、resign!)を足した。操作した人は recorder(第8回 8-5)。人の画面がまだ無いので by: は省ける - マイグレーションで memberships.fee_amount・fee_paid_on と officer_terms.left_on をイベントに移して消した(down で戻す)。金額の無い納入は 0 円で残す - OfficerTerm#left_on は退任のイベントから読む。在任の一覧は退任を先に読む(N+1 を避ける) - 記録のある会員資格・任期は消せない。画面は「消せません」と返す - data:load の left_on は resign! で記録する(2 回流しても 1 つ) - 台帳・models.ja.yml・ADR-0030 の補足を直した Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LHusZNG1bvUw3UqtEZz2Nf
- 会員資格を消す前に止める(before_destroy prepend)。これまでは何も言わずに消えなかった Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LHusZNG1bvUw3UqtEZz2Nf
Contributor
Author
|
🤖 敵対的レビュー(round 1): 指摘 5 件(Must 1 / Question 1 / FYI 3) Must
Question
FYI
直してほしい指摘は、番号で返事をください(例: |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #17
会費の納入と役員の退任を、列の書き換えからイベントにする(EPIC #5 の残り、docs/adr/0030)。
変えたこと
Membership::FeePayment.record!(membership, amount:, paid_on:, by: nil)。1 つの会員資格(1 人の 1 年度)に 1 回。金額は 0 円以上。OfficerTerm::Resignation.resign!(term, left_on:, reason: "", by: nil)。1 つの任期に 1 回。就任日より前の日は入れられない。Audit.final!)。操作した人の列はrecorder(開発QAボード 第8回 8-5)。人の画面がまだ無いのでby:は省ける。memberships.fee_amount・fee_paid_onとofficer_terms.left_onを、SQL でイベントに移してから消す。downで列とデータを戻す。金額の無い納入の記録は 0 円で残す。OfficerTerm#left_onは退任のイベントから読むので、呼ぶ側は変えていない。在任の一覧は退任をまとめて読む(N+1 を避ける)。restrict_with_error)。画面は「…記録があるので消せません」と返す。data:loadのleft_onはresign!で記録する(2 回流しても 1 つ)。docs/data-model.md。Membership・OfficerTerm を「済」に)、models.ja.yml、ADR-0030 の補足。画面
変えていない(会費・退任を記録する画面は、見直し票で決めてから)。人の画面の会費の表示は、イベントから読むようにした。
運用への影響
運用のスクリプトが
fee_paid_on・fee_amount・left_onを書いているなら、入口に替える必要がある。デプロイの前に連絡帳で知らせる。確かめたこと
bin/rails test: 450 件通る。COVERAGE=1: 100%。bin/standardrb・bin/brakeman(警告 0)・bin/rails model:verifyも通る。data:loadに架空のleft_onを入れて 2 回流した(退任のイベントは 1 つ)。🤖 Generated with Claude Code
https://claude.ai/code/session_01LHusZNG1bvUw3UqtEZz2Nf