7b43ce5844
Phase 28's in-game mail UI groups personal threads by the other party's race. To support that without an extra membership-listing RPC, the diplomail subsystem now: - accepts `recipient_race_name` on `POST /messages` and `POST /admin` (target=user) as an alternative to `recipient_user_id`; the service resolves it via the existing `Memberships.ListMembers(gameID, "active")` and rejects with `forbidden` when the matching member is no longer active; - snapshots `diplomail_messages.sender_race_name` at send time for every player sender (admin / system rows stay NULL). The UI keys per-race threading on this column. Schema, openapi, README, and a focused e2e test for the new path (happy path + dual / missing / unknown / kicked errors) land in this commit; the gateway + UI legs follow in subsequent commits on this branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
612 B
Go
31 lines
612 B
Go
//
|
|
// Code generated by go-jet DO NOT EDIT.
|
|
//
|
|
// WARNING: Changes to this file may cause incorrect behavior
|
|
// and will be lost if the code is regenerated
|
|
//
|
|
|
|
package model
|
|
|
|
import (
|
|
"github.com/google/uuid"
|
|
"time"
|
|
)
|
|
|
|
type DiplomailMessages struct {
|
|
MessageID uuid.UUID `sql:"primary_key"`
|
|
GameID uuid.UUID
|
|
GameName string
|
|
Kind string
|
|
SenderKind string
|
|
SenderUserID *uuid.UUID
|
|
SenderUsername *string
|
|
SenderRaceName *string
|
|
SenderIP string
|
|
Subject string
|
|
Body string
|
|
BodyLang string
|
|
BroadcastScope string
|
|
CreatedAt time.Time
|
|
}
|