feat: shorten urls & root path support for everything ever

This commit is contained in:
diced
2023-07-20 17:42:30 -07:00
parent e0bfb0ddeb
commit fa30d082fd
23 changed files with 788 additions and 52 deletions

View File

@@ -108,11 +108,10 @@ model File {
size Int
type String
views Int @default(0)
maxViews Int?
favorite Boolean @default(false)
password String?
zeroWidthSpace String?
tags Tag[]
User User? @relation(fields: [userId], references: [id], onDelete: SetNull, onUpdate: Cascade)
@@ -173,15 +172,16 @@ model Url {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
code String
vanity String?
destination String
name String @unique
views Int @default(0)
zeroWidthSpace String?
maxViews Int?
User User? @relation(fields: [userId], references: [id], onDelete: SetNull, onUpdate: Cascade)
userId String?
@@unique([code, vanity])
}
model Metric {