Skip to content

Commit

Permalink
User Schema done ✅
Browse files Browse the repository at this point in the history
  • Loading branch information
KartikeyKakaria committed Mar 27, 2024
1 parent d2e26b7 commit 9c5e9e8
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
prisma/migrations
.DS_Store
node_modules
/build
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"eslint-plugin-svelte": "^2.35.1",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.2.2",
"prisma": "5.11.0",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"tslib": "^2.4.1",
Expand All @@ -36,6 +37,7 @@
"type": "module",
"dependencies": {
"@internationalized/date": "^3.5.2",
"@prisma/client": "5.11.0",
"autoprefixer": "^10.4.18",
"lucide-svelte": "^0.359.0",
"postcss": "^8.4.35",
Expand Down
54 changes: 54 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,38 @@ datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}


model User{
id String @id @default(uuid())
name String
email String @unique
DOB DateTime
languages Languages
avatarImg String?
followersId String[]
followers User[] @relation("Followers")
following User[] @relation("Followers")
gender Gender
OAuth Boolean
created DateTime @default(now())
updated DateTime @default(now())
}

enum Gender {
Male
Female
Other
}

enum Languages{
JS
PYTHON
PHP
RUBY
RUST
SWIFT
C
CPP
OTHER
}

0 comments on commit 9c5e9e8

Please sign in to comment.