Initializes the Aethex Sentinel bot project, including package.json, Prisma schema, core client, configuration, health server, and event listeners for audit logs and member updates. Implements commands for federation management, sentinel security status, and ticket system. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e72fc1b7-94bd-4d6c-801f-cbac2fae245c Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Event-Id: fc082e4d-cb52-4049-9c2e-69ba6c2e78d4 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/e72fc1b7-94bd-4d6c-801f-cbac2fae245c/jW8PJKQ Replit-Helium-Checkpoint-Created: true
65 lines
1.5 KiB
Text
65 lines
1.5 KiB
Text
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model User {
|
|
id String @id
|
|
heatLevel Int @default(0)
|
|
balance Float @default(0.0)
|
|
roles String[]
|
|
lastHeatReset DateTime @default(now())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
tickets Ticket[]
|
|
heatEvents HeatEvent[]
|
|
}
|
|
|
|
model HeatEvent {
|
|
id Int @id @default(autoincrement())
|
|
userId String
|
|
action String
|
|
timestamp DateTime @default(now())
|
|
user User @relation(fields: [userId], references: [id])
|
|
|
|
@@index([userId, timestamp])
|
|
}
|
|
|
|
model Ticket {
|
|
id Int @id @default(autoincrement())
|
|
threadId String @unique
|
|
userId String
|
|
type String
|
|
status String @default("open")
|
|
transcript String?
|
|
createdAt DateTime @default(now())
|
|
closedAt DateTime?
|
|
user User @relation(fields: [userId], references: [id])
|
|
|
|
@@index([userId])
|
|
}
|
|
|
|
model GuildConfig {
|
|
id String @id
|
|
name String
|
|
type String
|
|
statusChannelId String?
|
|
feedChannelId String?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model RoleMapping {
|
|
id Int @id @default(autoincrement())
|
|
sourceGuild String
|
|
sourceRole String
|
|
targetGuild String
|
|
targetRole String
|
|
roleName String
|
|
|
|
@@unique([sourceGuild, sourceRole, targetGuild])
|
|
}
|