Skip to content

Commit f427a24

Browse files
newt239claude
andauthored
feat: メール一括送信APIでユーザーID指定による送信をサポート (#259)
* feat: メール一括送信APIでユーザーID指定による送信をサポート addressesに加えてuserIdsでも送信先を指定可能にし、ユーザーIDから学籍番号を取得して大学メールアドレスを自動生成する機能を追加。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: PR #259 レビュー指摘事項を修正 - SQLでuser_profiles.student_numberをusers.student_numberに修正し不要なJOINを削除 - UserIdsのvalidateタグからuuidを削除(openapi_types.UUIDに適用不可のため) - sendToAdminのdefault: falseをスキーマに復活 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bde266a commit f427a24

File tree

7 files changed

+205
-114
lines changed

7 files changed

+205
-114
lines changed

document/bundle.gen.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3211,19 +3211,25 @@ components:
32113211
ja: 備考
32123212
ReqPostMail:
32133213
required:
3214-
- addresses
32153214
- subject
32163215
- body
32173216
properties:
32183217
addresses:
32193218
type: array
3220-
minItems: 1
32213219
items:
32223220
type: string
32233221
format: email
32243222
x-oapi-codegen-extra-tags:
3225-
validate: required
3223+
validate: 'omitempty,dive,email'
32263224
ja: 送信先アドレス
3225+
userIds:
3226+
type: array
3227+
items:
3228+
type: string
3229+
format: uuid
3230+
x-oapi-codegen-extra-tags:
3231+
validate: 'omitempty,dive'
3232+
ja: 送信先ユーザーID
32273233
subject:
32283234
type: string
32293235
x-oapi-codegen-extra-tags:

document/schemas/req_post_mail.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
required:
2-
- addresses
32
- subject
43
- body
54
properties:
65
addresses:
76
type: array
8-
minItems: 1
97
items:
108
type: string
119
format: email
1210
x-oapi-codegen-extra-tags:
13-
validate: required
11+
validate: omitempty,dive,email
1412
ja: 送信先アドレス
13+
userIds:
14+
type: array
15+
items:
16+
type: string
17+
format: uuid
18+
x-oapi-codegen-extra-tags:
19+
validate: omitempty,dive
20+
ja: 送信先ユーザーID
1521
subject:
1622
type: string
1723
x-oapi-codegen-extra-tags:

pkg/api/models.gen.go

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/api/spec.gen.go

Lines changed: 96 additions & 96 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT BIN_TO_UUID(users.id) AS user_id, users.student_number FROM users WHERE BIN_TO_UUID(users.id) IN /*userIds*/('00000000-0000-0000-0000-000000000000');

0 commit comments

Comments
 (0)