feat(hane): davet kodu ile üye katılımı ve hane izolasyonu

- AuthUser her istekte kullanıcıyı DB'den doğrular (silinen kullanıcı → 401)
- require_owner: yalnızca hane sahibine açık işlemler
- Davet kodu: oluştur, listele, iptal et (7 gün, tek kullanım)
- Davet koduyla kayıt → mevcut haneye member olarak katılma (transaction)
- GET /api/household: hane bilgisi ve üyeler
- api.http güncellendi

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 23:43:16 +03:00
parent d6136959b1
commit 4cc4fa5882
14 changed files with 497 additions and 66 deletions
+13
View File
@@ -0,0 +1,13 @@
//! `invites` koleksiyonu (DATA_MODEL.md §3.3).
use mongodb::bson::{DateTime, Uuid};
use serde::Deserialize;
#[derive(Debug, Deserialize)]
pub struct Invite {
#[serde(rename = "_id")]
pub id: Uuid,
pub household_id: Uuid,
pub code: String,
pub expires_at: DateTime,
}
+1
View File
@@ -3,4 +3,5 @@
pub mod common;
pub mod household;
pub mod invite;
pub mod user;