feat(backend): add magicCooldownUntil to UserDevice
This commit is contained in:
parent
1a270739bc
commit
b9bd577e47
@ -0,0 +1,2 @@
|
|||||||
|
-- Add magicCooldownUntil for temporary sleep mode on Magic desktop devices
|
||||||
|
ALTER TABLE "rebreak"."user_devices" ADD COLUMN "magic_cooldown_until" TIMESTAMP(3);
|
||||||
@ -1105,6 +1105,8 @@ model UserDevice {
|
|||||||
/// Wann der User die Entfernung des Magic-Profils beantragt hat.
|
/// Wann der User die Entfernung des Magic-Profils beantragt hat.
|
||||||
/// Removal-Passwort wird erst nach +MAGIC_RELEASE_COOLDOWN_H sichtbar.
|
/// Removal-Passwort wird erst nach +MAGIC_RELEASE_COOLDOWN_H sichtbar.
|
||||||
magicReleaseRequestedAt DateTime? @map("magic_release_requested_at")
|
magicReleaseRequestedAt DateTime? @map("magic_release_requested_at")
|
||||||
|
/// Temporärer Sleep-Mode für Magic-Desktop-Geräte. NULL = kein Cooldown aktiv.
|
||||||
|
magicCooldownUntil DateTime? @map("magic_cooldown_until")
|
||||||
|
|
||||||
@@unique([userId, deviceId])
|
@@unique([userId, deviceId])
|
||||||
@@index([userId])
|
@@index([userId])
|
||||||
@ -1295,3 +1297,28 @@ model OauthPendingState {
|
|||||||
@@map("oauth_pending_states")
|
@@map("oauth_pending_states")
|
||||||
@@schema("rebreak")
|
@@schema("rebreak")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Client error / crash reports submitted by users or captured automatically.
|
||||||
|
/// Intentionally minimal PII: no emails, passwords, tokens, or message content.
|
||||||
|
/// Used for debugging during test phases and high-traffic rollouts.
|
||||||
|
model ErrorReport {
|
||||||
|
id String @id @default(uuid()) @db.Uuid
|
||||||
|
source String /// "native" | "magic" | "web" | "manual" | "auto"
|
||||||
|
severity String /// "error" | "crash" | "warning" | "info"
|
||||||
|
title String
|
||||||
|
message String
|
||||||
|
stack String?
|
||||||
|
context Json? /// free-form structured context (screen, device info, etc.)
|
||||||
|
deviceInfo Json? @map("device_info") /// platform, osVersion, appVersion, model
|
||||||
|
profileId String? @map("profile_id") @db.Uuid
|
||||||
|
/// Original client timestamp if provided, otherwise server time.
|
||||||
|
reportedAt DateTime @map("reported_at")
|
||||||
|
createdAt DateTime @default(now()) @map("created_at")
|
||||||
|
|
||||||
|
@@index([source])
|
||||||
|
@@index([severity])
|
||||||
|
@@index([createdAt])
|
||||||
|
@@index([profileId])
|
||||||
|
@@map("error_reports")
|
||||||
|
@@schema("rebreak")
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user