Add notification settings, account deletion, photo reporting, and pending-user photos

Addresses user bug reports: settings pages needed real notification
preferences and account deletion, admin needed a way to flag a specific
photo independent of deleting it, and the pending-approval users list
needed to surface applicant photos for review.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 18:08:57 +03:30
parent c8e6f80c51
commit 2c6d4bfbd2
12 changed files with 188 additions and 17 deletions
+3 -3
View File
@@ -2,12 +2,12 @@ package models
import "time"
// Report یک یادداشت/پرچم نظارتی که ادمین روی یک کاربر ثبت می‌کنه (مثلاً بر
// اساس شکایتی که از کانال دیگه‌ای دریافت شده)؛ برای پیگیری سابقه‌ی نظارتی
// یک کاربر، مستقل از بلاک‌شدن یا نشدنش.
// Report یک یادداشت/پرچم نظارتی که ادمین روی یک کاربر (یا یک عکس مشخص از
// اون کاربر) ثبت می‌کنه؛ برای پیگیری سابقه‌ی نظارتی، مستقل از بلاک/حذف کردن.
type Report struct {
ID uint `gorm:"primaryKey" json:"id"`
UserID uint `gorm:"not null;index" json:"user_id"`
PhotoID *uint `json:"photo_id,omitempty"`
Reason string `gorm:"type:text;not null" json:"reason"`
CreatedAt time.Time `json:"created_at"`
}
+7
View File
@@ -97,6 +97,13 @@ type User struct {
StreakCount int `gorm:"default:0;not null" json:"streak_count"`
LastActiveDate *time.Time `json:"last_active_date,omitempty"`
// -------- ترجیحات اعلان --------
// فعلاً فقط ذخیره می‌شن (زیرساخت ارسال واقعی اعلان هنوز پیاده نشده)؛ وقتی
// اون سیستم اضافه شد، همین مقادیر رو برای تصمیم به ارسال یا نه می‌خونه.
NotifyMatches bool `gorm:"default:true;not null" json:"notify_matches"`
NotifyMessages bool `gorm:"default:true;not null" json:"notify_messages"`
NotifyLikes bool `gorm:"default:true;not null" json:"notify_likes"`
// -------- موقعیت مکانی (برای محاسبه‌ی فاصله‌ی تقریبی در دوستیابی) --------
Latitude *float64 `json:"-"`
Longitude *float64 `json:"-"`