Styly
Styly
TTCTheo's Typesafe Cult
Created by Styly on 8/7/2024 in #questions
Rate my stack?
Rust grpc api(command&control not malware just gives out tasks), t3 for data display, rust client.
4 replies
TTCTheo's Typesafe Cult
Created by Styly on 2/26/2024 in #questions
Accidentally made a REST banking API, and mid way Documentation and a grpc client.
What do i do with it?
4 replies
TTCTheo's Typesafe Cult
Created by Styly on 12/30/2023 in #questions
Using t3 env how do i add test envs
I need to use some envs for tests and on prod these dont exist so i get an error. I need dev only env
4 replies
TTCTheo's Typesafe Cult
Created by Styly on 12/13/2023 in #questions
Prisma Two of the same model inside of a model
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "mysql"
url = env("DATABASE_URL")
relationMode = "prisma"
}

model wallet {
id String @id @unique
balance Decimal @default(0) @db.Decimal(65, 12)
uuidProof String @default(uuid())
history transaction[] @relation(name: "senderReceiver")
@@index([id])
}

model transaction {
id String @id @unique
sender wallet @relation("sender",fields: [senderId], references: [id])
senderId String @unique
receiver wallet @relation("receiver",fields: [receiverId], references: [id],onDelete: Cascade)
receiverId String @unique
transferedAt DateTime @default(now())
@@index([senderId, receiverId])
}
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "mysql"
url = env("DATABASE_URL")
relationMode = "prisma"
}

model wallet {
id String @id @unique
balance Decimal @default(0) @db.Decimal(65, 12)
uuidProof String @default(uuid())
history transaction[] @relation(name: "senderReceiver")
@@index([id])
}

model transaction {
id String @id @unique
sender wallet @relation("sender",fields: [senderId], references: [id])
senderId String @unique
receiver wallet @relation("receiver",fields: [receiverId], references: [id],onDelete: Cascade)
receiverId String @unique
transferedAt DateTime @default(now())
@@index([senderId, receiverId])
}
This is what i came up with the issue is that i need to use to instances of wallet with different names.
2 replies
TTCTheo's Typesafe Cult
Created by Styly on 9/15/2023 in #questions
How to Stop Race condition on t3 pages api
dupe
34 replies