add user profile, profile vibe and trip vibe and social signal

This commit is contained in:
2026-05-08 19:20:27 +07:00
parent 3228ef712f
commit 7f419638b5
39 changed files with 1361 additions and 192 deletions
@@ -0,0 +1,5 @@
-- CreateEnum
CREATE TYPE "Vibe" AS ENUM ('CHILL', 'BALANCED', 'HARDCORE');
-- AlterTable
ALTER TABLE "UserProfile" ADD COLUMN "vibe" "Vibe";
@@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE "Trip" ADD COLUMN "vibe" "Vibe";
-- CreateIndex
CREATE INDEX "Trip_vibe_status_date_idx" ON "Trip"("vibe", "status", "date");
+12 -1
View File
@@ -35,7 +35,7 @@ model User {
}
/// Profil sosial publik. Berisi info yang user pilih untuk dibagikan ke peserta lain
/// (bio, kota, minat). Tidak menyimpan data sensitif — KYC tetap di OrganizerVerification.
/// (bio, kota, minat, vibe). Tidak menyimpan data sensitif — KYC tetap di OrganizerVerification.
model UserProfile {
id String @id @default(cuid())
userId String @unique
@@ -49,11 +49,19 @@ model UserProfile {
interests String[] @default([])
/// Username Instagram (tanpa @, opsional)
instagram String?
/// Gaya jalan / energi user — dipakai untuk matching teman dengan ritme serupa.
vibe Vibe?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
enum Vibe {
CHILL
BALANCED
HARDCORE
}
/// Tabel link akun OAuth pihak ketiga (Google, dst). Diisi oleh PrismaAdapter NextAuth.
/// Session tidak pakai DB — kita pakai JWT, jadi Session/VerificationToken tidak perlu.
model Account {
@@ -136,6 +144,8 @@ model Trip {
endDate DateTime?
maxParticipants Int
price Int
/// Ritme/energi trip — dipakai untuk matching dengan vibe user.
vibe Vibe?
status TripStatus @default(OPEN)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -148,6 +158,7 @@ model Trip {
reviews TripReview[]
@@index([category, status, date])
@@index([vibe, status, date])
}
model TripReview {