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:
@@ -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,
|
||||
}
|
||||
@@ -3,4 +3,5 @@
|
||||
|
||||
pub mod common;
|
||||
pub mod household;
|
||||
pub mod invite;
|
||||
pub mod user;
|
||||
|
||||
Reference in New Issue
Block a user