few changes
This commit is contained in:
@@ -20,12 +20,14 @@ async function logOut() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const session = await auth()
|
const session = await auth();
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-center min-h-svh">
|
<div className="flex items-center justify-center min-h-svh">
|
||||||
<div className="flex flex-col items-center justify-center gap-4">
|
<div className="flex flex-col items-center justify-center gap-4">
|
||||||
<h1 className="text-2xl font-bold">Hello admin {session?.user?.name}</h1>
|
<h1 className="text-2xl font-bold">
|
||||||
{!session?.user && <Login logIn={logIn} />}
|
Hello admin {session?.user?.name}
|
||||||
|
</h1>
|
||||||
|
{!session?.user && <Login action={logIn} />}
|
||||||
<Studs action={getStudents} logOut={logOut} />
|
<Studs action={getStudents} logOut={logOut} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ export default function StudentRegistrationForm() {
|
|||||||
const progress = (currentStep / steps.length) * 100
|
const progress = (currentStep / steps.length) * 100
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50 py-8">
|
<div className="min-h-screen py-8">
|
||||||
<div className="max-w-3xl mx-auto px-4">
|
<div className="max-w-3xl mx-auto px-4">
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
|
|||||||
@@ -2,14 +2,10 @@
|
|||||||
import { signIn } from "@workspace/auth";
|
import { signIn } from "@workspace/auth";
|
||||||
import { Button } from "@workspace/ui/components/button";
|
import { Button } from "@workspace/ui/components/button";
|
||||||
|
|
||||||
export default function Login({logIn}: {logIn: () => Promise<void>}) {
|
export default function Login({ action }: { action: () => Promise<void> }) {
|
||||||
return (
|
return (
|
||||||
<form action={logIn}>
|
<form action={action}>
|
||||||
<Button
|
<Button type="submit" variant="outline" className="w-full h-12">
|
||||||
type="submit"
|
|
||||||
variant="outline"
|
|
||||||
className="w-full h-12"
|
|
||||||
>
|
|
||||||
<div className="absolute inset-0 bg-gradient-to-r from-primary/0 via-primary/10 to-primary/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700 ease-out pointer-events-none" />
|
<div className="absolute inset-0 bg-gradient-to-r from-primary/0 via-primary/10 to-primary/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700 ease-out pointer-events-none" />
|
||||||
<img
|
<img
|
||||||
src="https://static.cdnlogo.com/logos/g/35/google-icon.svg"
|
src="https://static.cdnlogo.com/logos/g/35/google-icon.svg"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
transpilePackages: ["@workspace/ui"],
|
transpilePackages: ["@workspace/ui", "@workspace/db", "@workspace/auth"],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ import { drizzle } from "drizzle-orm/neon-http";
|
|||||||
|
|
||||||
export const db = drizzle(process.env.DATABASE_URL!);
|
export const db = drizzle(process.env.DATABASE_URL!);
|
||||||
|
|
||||||
export * from "./schema.ts";
|
export * from "./schema";
|
||||||
|
|||||||
5
packages/db/migrations/0004_blushing_captain_flint.sql
Normal file
5
packages/db/migrations/0004_blushing_captain_flint.sql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
DROP TABLE "certificates" CASCADE;--> statement-breakpoint
|
||||||
|
DROP TABLE "projects" CASCADE;--> statement-breakpoint
|
||||||
|
ALTER TABLE "students" ADD COLUMN "isDiploma" boolean;--> statement-breakpoint
|
||||||
|
ALTER TABLE "companies" DROP COLUMN "passwordHash";--> statement-breakpoint
|
||||||
|
ALTER TABLE "internships" DROP COLUMN "status";
|
||||||
3
packages/db/migrations/0005_solid_photon.sql
Normal file
3
packages/db/migrations/0005_solid_photon.sql
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ALTER TABLE "students" ADD COLUMN "gender" varchar(10);--> statement-breakpoint
|
||||||
|
ALTER TABLE "students" ADD COLUMN "dob" timestamp;--> statement-breakpoint
|
||||||
|
ALTER TABLE "students" ADD COLUMN "personalGmail" text;
|
||||||
751
packages/db/migrations/meta/0004_snapshot.json
Normal file
751
packages/db/migrations/meta/0004_snapshot.json
Normal file
@@ -0,0 +1,751 @@
|
|||||||
|
{
|
||||||
|
"id": "5bcc500e-17e0-411d-8b8c-597d5b6de14d",
|
||||||
|
"prevId": "a00a32a1-83c4-49c8-b7b5-ff990facf461",
|
||||||
|
"version": "7",
|
||||||
|
"dialect": "postgresql",
|
||||||
|
"tables": {
|
||||||
|
"public.admins": {
|
||||||
|
"name": "admins",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"name": "email",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {
|
||||||
|
"admins_email_unique": {
|
||||||
|
"name": "admins_email_unique",
|
||||||
|
"nullsNotDistinct": false,
|
||||||
|
"columns": [
|
||||||
|
"email"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.applications": {
|
||||||
|
"name": "applications",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"job_id": {
|
||||||
|
"name": "job_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"student_id": {
|
||||||
|
"name": "student_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"resume_id": {
|
||||||
|
"name": "resume_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"name": "status",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "'pending'"
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"applications_job_id_jobs_id_fk": {
|
||||||
|
"name": "applications_job_id_jobs_id_fk",
|
||||||
|
"tableFrom": "applications",
|
||||||
|
"tableTo": "jobs",
|
||||||
|
"columnsFrom": [
|
||||||
|
"job_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
},
|
||||||
|
"applications_student_id_students_id_fk": {
|
||||||
|
"name": "applications_student_id_students_id_fk",
|
||||||
|
"tableFrom": "applications",
|
||||||
|
"tableTo": "students",
|
||||||
|
"columnsFrom": [
|
||||||
|
"student_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
},
|
||||||
|
"applications_resume_id_resumes_id_fk": {
|
||||||
|
"name": "applications_resume_id_resumes_id_fk",
|
||||||
|
"tableFrom": "applications",
|
||||||
|
"tableTo": "resumes",
|
||||||
|
"columnsFrom": [
|
||||||
|
"resume_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.companies": {
|
||||||
|
"name": "companies",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"name": "name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"name": "email",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"link": {
|
||||||
|
"name": "link",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"name": "description",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"imageURL": {
|
||||||
|
"name": "imageURL",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.grades": {
|
||||||
|
"name": "grades",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"student_id": {
|
||||||
|
"name": "student_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"sem": {
|
||||||
|
"name": "sem",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"sgpi": {
|
||||||
|
"name": "sgpi",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"isKT": {
|
||||||
|
"name": "isKT",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"deadKT": {
|
||||||
|
"name": "deadKT",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"grades_student_id_students_id_fk": {
|
||||||
|
"name": "grades_student_id_students_id_fk",
|
||||||
|
"tableFrom": "grades",
|
||||||
|
"tableTo": "students",
|
||||||
|
"columnsFrom": [
|
||||||
|
"student_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {
|
||||||
|
"grades_student_id_sem_pk": {
|
||||||
|
"name": "grades_student_id_sem_pk",
|
||||||
|
"columns": [
|
||||||
|
"student_id",
|
||||||
|
"sem"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {
|
||||||
|
"sem_check1": {
|
||||||
|
"name": "sem_check1",
|
||||||
|
"value": "\"grades\".\"sem\" < 9"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.internships": {
|
||||||
|
"name": "internships",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"student_id": {
|
||||||
|
"name": "student_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "title",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"company": {
|
||||||
|
"name": "company",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"name": "description",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"location": {
|
||||||
|
"name": "location",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"startDate": {
|
||||||
|
"name": "startDate",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"endDate": {
|
||||||
|
"name": "endDate",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"internships_student_id_students_id_fk": {
|
||||||
|
"name": "internships_student_id_students_id_fk",
|
||||||
|
"tableFrom": "internships",
|
||||||
|
"tableTo": "students",
|
||||||
|
"columnsFrom": [
|
||||||
|
"student_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.jobs": {
|
||||||
|
"name": "jobs",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"company_id": {
|
||||||
|
"name": "company_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "title",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"link": {
|
||||||
|
"name": "link",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"name": "description",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"location": {
|
||||||
|
"name": "location",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"imageURL": {
|
||||||
|
"name": "imageURL",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"salary": {
|
||||||
|
"name": "salary",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"applicationDeadline": {
|
||||||
|
"name": "applicationDeadline",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"active": {
|
||||||
|
"name": "active",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"minCGPA": {
|
||||||
|
"name": "minCGPA",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "'0'"
|
||||||
|
},
|
||||||
|
"minSSC": {
|
||||||
|
"name": "minSSC",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "'0'"
|
||||||
|
},
|
||||||
|
"minHSC": {
|
||||||
|
"name": "minHSC",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "'0'"
|
||||||
|
},
|
||||||
|
"allowDeadKT": {
|
||||||
|
"name": "allowDeadKT",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": true
|
||||||
|
},
|
||||||
|
"allowLiveKT": {
|
||||||
|
"name": "allowLiveKT",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": true
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"jobs_company_id_companies_id_fk": {
|
||||||
|
"name": "jobs_company_id_companies_id_fk",
|
||||||
|
"tableFrom": "jobs",
|
||||||
|
"tableTo": "companies",
|
||||||
|
"columnsFrom": [
|
||||||
|
"company_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.resumes": {
|
||||||
|
"name": "resumes",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"student_id": {
|
||||||
|
"name": "student_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "title",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"link": {
|
||||||
|
"name": "link",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"resumes_student_id_students_id_fk": {
|
||||||
|
"name": "resumes_student_id_students_id_fk",
|
||||||
|
"tableFrom": "resumes",
|
||||||
|
"tableTo": "students",
|
||||||
|
"columnsFrom": [
|
||||||
|
"student_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.students": {
|
||||||
|
"name": "students",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"name": "email",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"rollNumber": {
|
||||||
|
"name": "rollNumber",
|
||||||
|
"type": "varchar(12)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"verified": {
|
||||||
|
"name": "verified",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"firstName": {
|
||||||
|
"name": "firstName",
|
||||||
|
"type": "varchar(255)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"middleName": {
|
||||||
|
"name": "middleName",
|
||||||
|
"type": "varchar(255)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"name": "lastName",
|
||||||
|
"type": "varchar(255)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"mothersName": {
|
||||||
|
"name": "mothersName",
|
||||||
|
"type": "varchar(255)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"phoneNumber": {
|
||||||
|
"name": "phoneNumber",
|
||||||
|
"type": "varchar(10)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"address": {
|
||||||
|
"name": "address",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"profilePicture": {
|
||||||
|
"name": "profilePicture",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"degree": {
|
||||||
|
"name": "degree",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"branch": {
|
||||||
|
"name": "branch",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"year": {
|
||||||
|
"name": "year",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"skills": {
|
||||||
|
"name": "skills",
|
||||||
|
"type": "text[]",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"default": "ARRAY[]::text[]"
|
||||||
|
},
|
||||||
|
"linkedin": {
|
||||||
|
"name": "linkedin",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"github": {
|
||||||
|
"name": "github",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"ssc": {
|
||||||
|
"name": "ssc",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"hsc": {
|
||||||
|
"name": "hsc",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"isDiploma": {
|
||||||
|
"name": "isDiploma",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"enums": {},
|
||||||
|
"schemas": {},
|
||||||
|
"sequences": {},
|
||||||
|
"roles": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"_meta": {
|
||||||
|
"columns": {},
|
||||||
|
"schemas": {},
|
||||||
|
"tables": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
769
packages/db/migrations/meta/0005_snapshot.json
Normal file
769
packages/db/migrations/meta/0005_snapshot.json
Normal file
@@ -0,0 +1,769 @@
|
|||||||
|
{
|
||||||
|
"id": "1506d00a-2620-44ac-af01-19e04c21f679",
|
||||||
|
"prevId": "5bcc500e-17e0-411d-8b8c-597d5b6de14d",
|
||||||
|
"version": "7",
|
||||||
|
"dialect": "postgresql",
|
||||||
|
"tables": {
|
||||||
|
"public.admins": {
|
||||||
|
"name": "admins",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"name": "email",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {
|
||||||
|
"admins_email_unique": {
|
||||||
|
"name": "admins_email_unique",
|
||||||
|
"nullsNotDistinct": false,
|
||||||
|
"columns": [
|
||||||
|
"email"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.applications": {
|
||||||
|
"name": "applications",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"job_id": {
|
||||||
|
"name": "job_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"student_id": {
|
||||||
|
"name": "student_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"resume_id": {
|
||||||
|
"name": "resume_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"name": "status",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "'pending'"
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"applications_job_id_jobs_id_fk": {
|
||||||
|
"name": "applications_job_id_jobs_id_fk",
|
||||||
|
"tableFrom": "applications",
|
||||||
|
"tableTo": "jobs",
|
||||||
|
"columnsFrom": [
|
||||||
|
"job_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
},
|
||||||
|
"applications_student_id_students_id_fk": {
|
||||||
|
"name": "applications_student_id_students_id_fk",
|
||||||
|
"tableFrom": "applications",
|
||||||
|
"tableTo": "students",
|
||||||
|
"columnsFrom": [
|
||||||
|
"student_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
},
|
||||||
|
"applications_resume_id_resumes_id_fk": {
|
||||||
|
"name": "applications_resume_id_resumes_id_fk",
|
||||||
|
"tableFrom": "applications",
|
||||||
|
"tableTo": "resumes",
|
||||||
|
"columnsFrom": [
|
||||||
|
"resume_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.companies": {
|
||||||
|
"name": "companies",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"name": "name",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"name": "email",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"link": {
|
||||||
|
"name": "link",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"name": "description",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"imageURL": {
|
||||||
|
"name": "imageURL",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.grades": {
|
||||||
|
"name": "grades",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"student_id": {
|
||||||
|
"name": "student_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"sem": {
|
||||||
|
"name": "sem",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"sgpi": {
|
||||||
|
"name": "sgpi",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"isKT": {
|
||||||
|
"name": "isKT",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"deadKT": {
|
||||||
|
"name": "deadKT",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"grades_student_id_students_id_fk": {
|
||||||
|
"name": "grades_student_id_students_id_fk",
|
||||||
|
"tableFrom": "grades",
|
||||||
|
"tableTo": "students",
|
||||||
|
"columnsFrom": [
|
||||||
|
"student_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {
|
||||||
|
"grades_student_id_sem_pk": {
|
||||||
|
"name": "grades_student_id_sem_pk",
|
||||||
|
"columns": [
|
||||||
|
"student_id",
|
||||||
|
"sem"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {
|
||||||
|
"sem_check1": {
|
||||||
|
"name": "sem_check1",
|
||||||
|
"value": "\"grades\".\"sem\" < 9"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.internships": {
|
||||||
|
"name": "internships",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"student_id": {
|
||||||
|
"name": "student_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "title",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"company": {
|
||||||
|
"name": "company",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"name": "description",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"location": {
|
||||||
|
"name": "location",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"startDate": {
|
||||||
|
"name": "startDate",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"endDate": {
|
||||||
|
"name": "endDate",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"internships_student_id_students_id_fk": {
|
||||||
|
"name": "internships_student_id_students_id_fk",
|
||||||
|
"tableFrom": "internships",
|
||||||
|
"tableTo": "students",
|
||||||
|
"columnsFrom": [
|
||||||
|
"student_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.jobs": {
|
||||||
|
"name": "jobs",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"company_id": {
|
||||||
|
"name": "company_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "title",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"link": {
|
||||||
|
"name": "link",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"name": "description",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"location": {
|
||||||
|
"name": "location",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"imageURL": {
|
||||||
|
"name": "imageURL",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"salary": {
|
||||||
|
"name": "salary",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"applicationDeadline": {
|
||||||
|
"name": "applicationDeadline",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"active": {
|
||||||
|
"name": "active",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"minCGPA": {
|
||||||
|
"name": "minCGPA",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "'0'"
|
||||||
|
},
|
||||||
|
"minSSC": {
|
||||||
|
"name": "minSSC",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "'0'"
|
||||||
|
},
|
||||||
|
"minHSC": {
|
||||||
|
"name": "minHSC",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "'0'"
|
||||||
|
},
|
||||||
|
"allowDeadKT": {
|
||||||
|
"name": "allowDeadKT",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": true
|
||||||
|
},
|
||||||
|
"allowLiveKT": {
|
||||||
|
"name": "allowLiveKT",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": true
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"jobs_company_id_companies_id_fk": {
|
||||||
|
"name": "jobs_company_id_companies_id_fk",
|
||||||
|
"tableFrom": "jobs",
|
||||||
|
"tableTo": "companies",
|
||||||
|
"columnsFrom": [
|
||||||
|
"company_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.resumes": {
|
||||||
|
"name": "resumes",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"student_id": {
|
||||||
|
"name": "student_id",
|
||||||
|
"type": "integer",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "title",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"link": {
|
||||||
|
"name": "link",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {
|
||||||
|
"resumes_student_id_students_id_fk": {
|
||||||
|
"name": "resumes_student_id_students_id_fk",
|
||||||
|
"tableFrom": "resumes",
|
||||||
|
"tableTo": "students",
|
||||||
|
"columnsFrom": [
|
||||||
|
"student_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "no action",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
|
"public.students": {
|
||||||
|
"name": "students",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "serial",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"name": "email",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"rollNumber": {
|
||||||
|
"name": "rollNumber",
|
||||||
|
"type": "varchar(12)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"verified": {
|
||||||
|
"name": "verified",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"firstName": {
|
||||||
|
"name": "firstName",
|
||||||
|
"type": "varchar(255)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"middleName": {
|
||||||
|
"name": "middleName",
|
||||||
|
"type": "varchar(255)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"name": "lastName",
|
||||||
|
"type": "varchar(255)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"mothersName": {
|
||||||
|
"name": "mothersName",
|
||||||
|
"type": "varchar(255)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"gender": {
|
||||||
|
"name": "gender",
|
||||||
|
"type": "varchar(10)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"dob": {
|
||||||
|
"name": "dob",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"personalGmail": {
|
||||||
|
"name": "personalGmail",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"phoneNumber": {
|
||||||
|
"name": "phoneNumber",
|
||||||
|
"type": "varchar(10)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"address": {
|
||||||
|
"name": "address",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"profilePicture": {
|
||||||
|
"name": "profilePicture",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"degree": {
|
||||||
|
"name": "degree",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"branch": {
|
||||||
|
"name": "branch",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"year": {
|
||||||
|
"name": "year",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"skills": {
|
||||||
|
"name": "skills",
|
||||||
|
"type": "text[]",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"default": "ARRAY[]::text[]"
|
||||||
|
},
|
||||||
|
"linkedin": {
|
||||||
|
"name": "linkedin",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"github": {
|
||||||
|
"name": "github",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"ssc": {
|
||||||
|
"name": "ssc",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"hsc": {
|
||||||
|
"name": "hsc",
|
||||||
|
"type": "numeric(4, 2)",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"isDiploma": {
|
||||||
|
"name": "isDiploma",
|
||||||
|
"type": "boolean",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"name": "createdAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"updatedAt": {
|
||||||
|
"name": "updatedAt",
|
||||||
|
"type": "timestamp",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "now()"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"enums": {},
|
||||||
|
"schemas": {},
|
||||||
|
"sequences": {},
|
||||||
|
"roles": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"_meta": {
|
||||||
|
"columns": {},
|
||||||
|
"schemas": {},
|
||||||
|
"tables": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -29,6 +29,20 @@
|
|||||||
"when": 1750849519081,
|
"when": 1750849519081,
|
||||||
"tag": "0003_clammy_shadowcat",
|
"tag": "0003_clammy_shadowcat",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 4,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1751094285471,
|
||||||
|
"tag": "0004_blushing_captain_flint",
|
||||||
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 5,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1751182452704,
|
||||||
|
"tag": "0005_solid_photon",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
integer,
|
integer,
|
||||||
numeric,
|
numeric,
|
||||||
primaryKey,
|
primaryKey,
|
||||||
check
|
check,
|
||||||
} from "drizzle-orm/pg-core";
|
} from "drizzle-orm/pg-core";
|
||||||
|
|
||||||
export const students = pgTable("students", {
|
export const students = pgTable("students", {
|
||||||
@@ -21,6 +21,9 @@ export const students = pgTable("students", {
|
|||||||
middleName: varchar({ length: 255 }),
|
middleName: varchar({ length: 255 }),
|
||||||
lastName: varchar({ length: 255 }),
|
lastName: varchar({ length: 255 }),
|
||||||
mothersName: varchar({ length: 255 }),
|
mothersName: varchar({ length: 255 }),
|
||||||
|
gender: varchar({ length: 10 }),
|
||||||
|
dob: timestamp(),
|
||||||
|
personalGmail: text(),
|
||||||
phoneNumber: varchar({ length: 10 }),
|
phoneNumber: varchar({ length: 10 }),
|
||||||
address: text(),
|
address: text(),
|
||||||
profilePicture: text(),
|
profilePicture: text(),
|
||||||
@@ -32,9 +35,9 @@ export const students = pgTable("students", {
|
|||||||
.default(sql`ARRAY[]::text[]`),
|
.default(sql`ARRAY[]::text[]`),
|
||||||
linkedin: text(),
|
linkedin: text(),
|
||||||
github: text(),
|
github: text(),
|
||||||
ssc: numeric({ precision: 4, scale: 2 }),
|
ssc: numeric({ precision: 4, scale: 2 }), // TODO: year, board
|
||||||
hsc: numeric({ precision: 4, scale: 2 }),
|
hsc: numeric({ precision: 4, scale: 2 }), // TODO: year, board
|
||||||
isDiploma: boolean(),
|
isDiploma: boolean(), // TODO: diploma branch
|
||||||
createdAt: timestamp().notNull().defaultNow(),
|
createdAt: timestamp().notNull().defaultNow(),
|
||||||
updatedAt: timestamp()
|
updatedAt: timestamp()
|
||||||
.defaultNow()
|
.defaultNow()
|
||||||
@@ -53,7 +56,7 @@ export const internships = pgTable("internships", {
|
|||||||
location: text().notNull(),
|
location: text().notNull(),
|
||||||
startDate: timestamp().notNull(),
|
startDate: timestamp().notNull(),
|
||||||
endDate: timestamp().notNull(),
|
endDate: timestamp().notNull(),
|
||||||
status: text().notNull(),
|
// status: text().notNull(),
|
||||||
createdAt: timestamp().notNull().defaultNow(),
|
createdAt: timestamp().notNull().defaultNow(),
|
||||||
updatedAt: timestamp()
|
updatedAt: timestamp()
|
||||||
.defaultNow()
|
.defaultNow()
|
||||||
@@ -61,38 +64,38 @@ export const internships = pgTable("internships", {
|
|||||||
.notNull(),
|
.notNull(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const projects = pgTable("projects", {
|
// export const projects = pgTable("projects", {
|
||||||
id: serial().primaryKey(),
|
// id: serial().primaryKey(),
|
||||||
studentId: integer("student_id")
|
// studentId: integer("student_id")
|
||||||
.notNull()
|
// .notNull()
|
||||||
.references(() => students.id),
|
// .references(() => students.id),
|
||||||
title: text().notNull(),
|
// title: text().notNull(),
|
||||||
description: text().notNull(),
|
// description: text().notNull(),
|
||||||
links: text()
|
// links: text()
|
||||||
.array()
|
// .array()
|
||||||
.notNull()
|
// .notNull()
|
||||||
.default(sql`ARRAY[]::text[]`),
|
// .default(sql`ARRAY[]::text[]`),
|
||||||
createdAt: timestamp().notNull().defaultNow(),
|
// createdAt: timestamp().notNull().defaultNow(),
|
||||||
updatedAt: timestamp()
|
// updatedAt: timestamp()
|
||||||
.defaultNow()
|
// .defaultNow()
|
||||||
.$onUpdate(() => new Date())
|
// .$onUpdate(() => new Date())
|
||||||
.notNull(),
|
// .notNull(),
|
||||||
});
|
// });
|
||||||
|
|
||||||
export const certificates = pgTable("certificates", {
|
// export const certificates = pgTable("certificates", {
|
||||||
id: serial().primaryKey(),
|
// id: serial().primaryKey(),
|
||||||
studentId: integer("student_id")
|
// studentId: integer("student_id")
|
||||||
.notNull()
|
// .notNull()
|
||||||
.references(() => students.id),
|
// .references(() => students.id),
|
||||||
title: text().notNull(),
|
// title: text().notNull(),
|
||||||
description: text().notNull(),
|
// description: text().notNull(),
|
||||||
link: text().notNull(),
|
// link: text().notNull(),
|
||||||
createdAt: timestamp().notNull().defaultNow(),
|
// createdAt: timestamp().notNull().defaultNow(),
|
||||||
updatedAt: timestamp()
|
// updatedAt: timestamp()
|
||||||
.defaultNow()
|
// .defaultNow()
|
||||||
.$onUpdate(() => new Date())
|
// .$onUpdate(() => new Date())
|
||||||
.notNull(),
|
// .notNull(),
|
||||||
});
|
// });
|
||||||
|
|
||||||
export const resumes = pgTable("resumes", {
|
export const resumes = pgTable("resumes", {
|
||||||
id: serial().primaryKey(),
|
id: serial().primaryKey(),
|
||||||
@@ -108,7 +111,9 @@ export const resumes = pgTable("resumes", {
|
|||||||
.notNull(),
|
.notNull(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const grades = pgTable("grades", {
|
export const grades = pgTable(
|
||||||
|
"grades",
|
||||||
|
{
|
||||||
studentId: integer("student_id")
|
studentId: integer("student_id")
|
||||||
.notNull()
|
.notNull()
|
||||||
.references(() => students.id),
|
.references(() => students.id),
|
||||||
@@ -121,12 +126,17 @@ export const grades = pgTable("grades", {
|
|||||||
.defaultNow()
|
.defaultNow()
|
||||||
.$onUpdate(() => new Date())
|
.$onUpdate(() => new Date())
|
||||||
.notNull(),
|
.notNull(),
|
||||||
}, (table) => [primaryKey({ columns: [table.studentId, table.sem] }), check("sem_check1", sql`${table.sem} < 9`)]);
|
},
|
||||||
|
(table) => [
|
||||||
|
primaryKey({ columns: [table.studentId, table.sem] }),
|
||||||
|
check("sem_check1", sql`${table.sem} < 9`),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
export const studentRelations = relations(students, ({ many }) => ({
|
export const studentRelations = relations(students, ({ many }) => ({
|
||||||
internships: many(internships),
|
internships: many(internships),
|
||||||
projects: many(projects),
|
// projects: many(projects),
|
||||||
certificates: many(certificates),
|
// certificates: many(certificates),
|
||||||
resumes: many(resumes),
|
resumes: many(resumes),
|
||||||
grades: many(grades),
|
grades: many(grades),
|
||||||
}));
|
}));
|
||||||
@@ -138,19 +148,19 @@ export const internshipRelations = relations(internships, ({ one }) => ({
|
|||||||
}),
|
}),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export const projectRelations = relations(projects, ({ one }) => ({
|
// export const projectRelations = relations(projects, ({ one }) => ({
|
||||||
student: one(students, {
|
// student: one(students, {
|
||||||
fields: [projects.studentId],
|
// fields: [projects.studentId],
|
||||||
references: [students.id],
|
// references: [students.id],
|
||||||
}),
|
// }),
|
||||||
}));
|
// }));
|
||||||
|
|
||||||
export const certificateRelations = relations(certificates, ({ one }) => ({
|
// export const certificateRelations = relations(certificates, ({ one }) => ({
|
||||||
student: one(students, {
|
// student: one(students, {
|
||||||
fields: [certificates.studentId],
|
// fields: [certificates.studentId],
|
||||||
references: [students.id],
|
// references: [students.id],
|
||||||
}),
|
// }),
|
||||||
}));
|
// }));
|
||||||
|
|
||||||
export const resumeRelations = relations(resumes, ({ one, many }) => ({
|
export const resumeRelations = relations(resumes, ({ one, many }) => ({
|
||||||
student: one(students, {
|
student: one(students, {
|
||||||
@@ -173,7 +183,7 @@ export const companies = pgTable("companies", {
|
|||||||
email: text().notNull(),
|
email: text().notNull(),
|
||||||
link: text().notNull(),
|
link: text().notNull(),
|
||||||
description: text().notNull(),
|
description: text().notNull(),
|
||||||
passwordHash: text(),
|
// passwordHash: text(),
|
||||||
imageURL: text().notNull(),
|
imageURL: text().notNull(),
|
||||||
createdAt: timestamp().notNull().defaultNow(),
|
createdAt: timestamp().notNull().defaultNow(),
|
||||||
updatedAt: timestamp()
|
updatedAt: timestamp()
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "@workspace/typescript-config/nextjs.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"baseUrl": ".",
|
|
||||||
"paths": {
|
|
||||||
"@/*": ["./*"],
|
|
||||||
},
|
|
||||||
"allowImportingTsExtensions": true,
|
|
||||||
},
|
|
||||||
"include": ["**/*.ts", "**/*.tsx"],
|
|
||||||
"exclude": ["node_modules"]
|
|
||||||
}
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,30 +1,33 @@
|
|||||||
import type * as React from "react"
|
import React from "react";
|
||||||
import { Slot } from "@radix-ui/react-slot"
|
import { Slot } from "@radix-ui/react-slot";
|
||||||
import { cva, type VariantProps } from "class-variance-authority"
|
import { cva, type VariantProps } from "class-variance-authority";
|
||||||
|
|
||||||
import { cn } from "@workspace/ui/lib/utils"
|
import { cn } from "@workspace/ui/lib/utils";
|
||||||
|
|
||||||
const buttonVariants = cva(
|
const buttonVariants = cva(
|
||||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-semibold transition-all duration-200 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-4 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transform active:scale-95",
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all duration-200 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring hover:scale-105 active:scale-95 transform-gpu",
|
||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default:
|
default:
|
||||||
"bg-primary text-primary-foreground shadow-lg shadow-primary/25 hover:bg-primary/90 hover:shadow-xl hover:shadow-primary/30 hover:-translate-y-0.5 border border-primary/20",
|
"bg-primary text-primary-foreground shadow-lg shadow-primary/25 hover:bg-primary/85 hover:shadow-xl hover:shadow-primary/35",
|
||||||
destructive:
|
destructive:
|
||||||
"bg-destructive text-destructive-foreground shadow-lg shadow-destructive/25 hover:bg-destructive/90 hover:shadow-xl hover:shadow-destructive/30 hover:-translate-y-0.5 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 border border-destructive/20",
|
"bg-destructive text-destructive-foreground shadow-lg shadow-destructive/25 hover:bg-destructive/85 hover:shadow-xl hover:shadow-destructive/35",
|
||||||
outline:
|
outline:
|
||||||
"bg-background border-2 border-border text-foreground shadow-md hover:bg-accent/10 hover:border-accent/50 hover:text-accent-foreground hover:shadow-lg hover:-translate-y-0.5 transition-all duration-200 ease-out backdrop-blur-sm",
|
"border-2 border-primary/20 bg-background hover:bg-primary/5 hover:text-primary hover:border-primary/40 shadow-md hover:shadow-lg hover:shadow-primary/15",
|
||||||
secondary:
|
secondary:
|
||||||
"bg-secondary text-secondary-foreground shadow-md shadow-secondary/20 hover:bg-secondary/80 hover:shadow-lg hover:-translate-y-0.5 border border-secondary/30",
|
"bg-secondary text-secondary-foreground shadow-md hover:bg-secondary/80 hover:shadow-lg",
|
||||||
ghost: "hover:bg-accent/10 hover:text-accent-foreground rounded-lg transition-all duration-200 hover:shadow-md",
|
ghost:
|
||||||
link: "text-primary underline-offset-4 hover:underline hover:text-primary/80 transition-colors duration-200",
|
"hover:bg-primary/10 hover:text-primary hover:shadow-md hover:shadow-primary/10",
|
||||||
|
link: "text-primary underline-offset-4 hover:underline hover:text-accent p-0 h-auto font-normal hover:scale-100 active:scale-100",
|
||||||
|
accent:
|
||||||
|
"bg-accent text-accent-foreground shadow-lg shadow-accent/25 hover:bg-accent/85 hover:shadow-xl hover:shadow-accent/35",
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
default: "h-11 px-6 py-3 has-[>svg]:px-5",
|
default: "h-10 px-4 py-2",
|
||||||
sm: "h-9 rounded-lg gap-1.5 px-4 has-[>svg]:px-3 text-xs font-medium",
|
sm: "h-8 rounded-md px-3 text-xs",
|
||||||
lg: "h-13 rounded-xl px-8 has-[>svg]:px-6 text-base",
|
lg: "h-12 rounded-lg px-6 text-base",
|
||||||
icon: "size-11 rounded-xl",
|
icon: "h-10 w-10",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
@@ -32,21 +35,26 @@ const buttonVariants = cva(
|
|||||||
size: "default",
|
size: "default",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
);
|
||||||
|
|
||||||
function Button({
|
export interface ButtonProps
|
||||||
className,
|
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
||||||
variant,
|
VariantProps<typeof buttonVariants> {
|
||||||
size,
|
asChild?: boolean;
|
||||||
asChild = false,
|
|
||||||
...props
|
|
||||||
}: React.ComponentProps<"button"> &
|
|
||||||
VariantProps<typeof buttonVariants> & {
|
|
||||||
asChild?: boolean
|
|
||||||
}) {
|
|
||||||
const Comp = asChild ? Slot : "button"
|
|
||||||
|
|
||||||
return <Comp data-slot="button" className={cn(buttonVariants({ variant, size, className }))} {...props} />
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Button, buttonVariants }
|
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
||||||
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
||||||
|
const Comp = asChild ? Slot : "button";
|
||||||
|
return (
|
||||||
|
<Comp
|
||||||
|
className={cn(buttonVariants({ variant, size, className }))}
|
||||||
|
ref={ref}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
Button.displayName = "Button";
|
||||||
|
|
||||||
|
export { Button, buttonVariants };
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|||||||
<div
|
<div
|
||||||
data-slot="card"
|
data-slot="card"
|
||||||
className={cn(
|
className={cn(
|
||||||
"bg-card text-card-foreground flex flex-col gap-6 rounded-2xl border border-border/50 py-8 shadow-xl shadow-black/5 backdrop-blur-sm hover:shadow-2xl hover:shadow-black/10 transition-all duration-300 hover:-translate-y-1 bg-gradient-to-br from-card to-card/80",
|
"bg-card/90 text-card-foreground flex flex-col gap-6 rounded-2xl border border-border/50 py-8 shadow-xl shadow-black/5 backdrop-blur-sm hover:shadow-2xl hover:shadow-black/10 transition-all duration-300 hover:-translate-y-1",
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|||||||
type={type}
|
type={type}
|
||||||
data-slot="input"
|
data-slot="input"
|
||||||
className={cn(
|
className={cn(
|
||||||
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-12 w-full min-w-0 rounded-xl border-2 bg-transparent px-4 py-3 text-base shadow-md shadow-black/5 transition-all duration-200 outline-none file:inline-flex file:h-8 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm backdrop-blur-sm",
|
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-12 w-full min-w-0 rounded-md border-2 bg-transparent px-4 py-3 text-base shadow-md shadow-black/5 transition-all duration-200 outline-none file:inline-flex file:h-8 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm backdrop-blur-sm",
|
||||||
"focus-visible:border-primary focus-visible:ring-primary/20 focus-visible:ring-4 focus-visible:shadow-lg focus-visible:shadow-primary/10",
|
"focus-visible:border-primary focus-visible:ring-primary/20 focus-visible:ring-4 focus-visible:shadow-lg focus-visible:shadow-primary/10",
|
||||||
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
||||||
"hover:border-border/80 hover:shadow-lg",
|
"hover:border-border/80 hover:shadow-lg",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function Progress({ className, value, ...props }: React.ComponentProps<typeof Pr
|
|||||||
>
|
>
|
||||||
<ProgressPrimitive.Indicator
|
<ProgressPrimitive.Indicator
|
||||||
data-slot="progress-indicator"
|
data-slot="progress-indicator"
|
||||||
className="bg-gradient-to-r from-primary to-accent h-full w-full flex-1 transition-all duration-500 ease-out rounded-full shadow-sm"
|
className="bg-gradient-to-r from-accent to-primary h-full w-full flex-1 transition-all duration-500 ease-out rounded-full shadow-sm"
|
||||||
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
||||||
/>
|
/>
|
||||||
</ProgressPrimitive.Root>
|
</ProgressPrimitive.Root>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function Separator({
|
|||||||
decorative={decorative}
|
decorative={decorative}
|
||||||
orientation={orientation}
|
orientation={orientation}
|
||||||
className={cn(
|
className={cn(
|
||||||
"bg-gradient-to-r from-transparent via-border to-transparent shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px data-[orientation=vertical]:bg-gradient-to-b",
|
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px data-[orientation=vertical]:bg-gradient-to-b",
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|||||||
<textarea
|
<textarea
|
||||||
data-slot="textarea"
|
data-slot="textarea"
|
||||||
className={cn(
|
className={cn(
|
||||||
"border-input placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-primary/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-20 w-full rounded-xl border-2 bg-transparent px-4 py-3 text-base shadow-md shadow-black/5 transition-all duration-200 outline-none focus-visible:ring-4 focus-visible:shadow-lg focus-visible:shadow-primary/10 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm backdrop-blur-sm hover:border-border/80 hover:shadow-lg resize-none",
|
"border-input placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-primary/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-20 w-full rounded-md border-2 bg-transparent px-4 py-3 text-base shadow-md shadow-black/5 transition-all duration-200 outline-none focus-visible:ring-4 focus-visible:shadow-lg focus-visible:shadow-primary/10 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm backdrop-blur-sm hover:border-border/80 hover:shadow-lg resize-none",
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
@@ -13,74 +13,74 @@
|
|||||||
@custom-variant dark (&:is(.dark *));
|
@custom-variant dark (&:is(.dark *));
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--background: oklch(0.9889 0.004 286.33);
|
--background: oklch(0.98 0.003 240);
|
||||||
--foreground: oklch(0.2442 0.006 0.59);
|
--foreground: oklch(0.12 0.008 240);
|
||||||
--card: oklch(0.97 0.004 286.33);
|
--card: oklch(0.96 0.004 240);
|
||||||
--card-foreground: oklch(0.2442 0.006 0.59);
|
--card-foreground: oklch(0.12 0.008 240);
|
||||||
--popover: oklch(1 0 0);
|
--popover: oklch(1 0 0);
|
||||||
--popover-foreground: oklch(0.2442 0.006 0.59);
|
--popover-foreground: oklch(0.12 0.008 240);
|
||||||
--primary: oklch(0.5044 0.184 22.51);
|
--primary: oklch(0.35 0.18 240);
|
||||||
--primary-foreground: oklch(0.9889 0.004 286.33);
|
--primary-foreground: oklch(0.98 0.003 240);
|
||||||
--secondary: oklch(0.4605 0.005 271.31);
|
--secondary: oklch(0.88 0.008 240);
|
||||||
--secondary-foreground: oklch(0.9889 0.004 286.33);
|
--secondary-foreground: oklch(0.12 0.008 240);
|
||||||
--muted: oklch(0.92 0.003 286.33);
|
--muted: oklch(0.92 0.006 240);
|
||||||
--muted-foreground: oklch(0.44 0.004 286.33);
|
--muted-foreground: oklch(0.4 0.01 240);
|
||||||
--accent: oklch(0.6034 0.234 27.23);
|
--accent: oklch(0.42 0.22 10);
|
||||||
--accent-foreground: oklch(0.9889 0.004 286.33);
|
--accent-foreground: oklch(0.98 0.003 240);
|
||||||
--destructive: oklch(0.55 0.18 27.23);
|
--destructive: oklch(0.45 0.25 15);
|
||||||
--destructive-foreground: oklch(0.9889 0.004 286.33);
|
--destructive-foreground: oklch(0.98 0.003 240);
|
||||||
--border: oklch(0.88 0.003 286.33);
|
--border: oklch(0.86 0.008 240);
|
||||||
--input: oklch(0.97 0.004 286.33);
|
--input: oklch(0.94 0.006 240);
|
||||||
--ring: oklch(0.6034 0.234 27.23);
|
--ring: oklch(0.35 0.18 240);
|
||||||
--chart-1: oklch(0.5044 0.184 22.51);
|
--chart-1: oklch(0.35 0.18 240);
|
||||||
--chart-2: oklch(0.6034 0.234 27.23);
|
--chart-2: oklch(0.42 0.22 10);
|
||||||
--chart-3: oklch(0.4605 0.005 271.31);
|
--chart-3: oklch(0.38 0.16 260);
|
||||||
--chart-4: oklch(0.7 0.15 120);
|
--chart-4: oklch(0.4 0.2 350);
|
||||||
--chart-5: oklch(0.7 0.15 300);
|
--chart-5: oklch(0.36 0.15 220);
|
||||||
--radius: 0.625rem;
|
--radius: 0.625rem;
|
||||||
--sidebar: oklch(0.97 0.004 286.33);
|
--sidebar: oklch(0.94 0.006 240);
|
||||||
--sidebar-foreground: oklch(0.2442 0.006 0.59);
|
--sidebar-foreground: oklch(0.12 0.008 240);
|
||||||
--sidebar-primary: oklch(0.5044 0.184 22.51);
|
--sidebar-primary: oklch(0.35 0.18 240);
|
||||||
--sidebar-primary-foreground: oklch(0.9889 0.004 286.33);
|
--sidebar-primary-foreground: oklch(0.98 0.003 240);
|
||||||
--sidebar-accent: oklch(0.6034 0.234 27.23);
|
--sidebar-accent: oklch(0.42 0.22 10);
|
||||||
--sidebar-accent-foreground: oklch(0.9889 0.004 286.33);
|
--sidebar-accent-foreground: oklch(0.98 0.003 240);
|
||||||
--sidebar-border: oklch(0.88 0.003 286.33);
|
--sidebar-border: oklch(0.86 0.008 240);
|
||||||
--sidebar-ring: oklch(0.6034 0.234 27.23);
|
--sidebar-ring: oklch(0.35 0.18 240);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
--background: oklch(0.18 0.01 286.33);
|
--background: oklch(0.06 0.008 240);
|
||||||
--foreground: oklch(0.9889 0.004 286.33);
|
--foreground: oklch(0.94 0.004 240);
|
||||||
--card: oklch(0.22 0.01 286.33);
|
--card: oklch(0.1 0.01 240);
|
||||||
--card-foreground: oklch(0.9889 0.004 286.33);
|
--card-foreground: oklch(0.94 0.004 240);
|
||||||
--popover: oklch(0.22 0.01 286.33);
|
--popover: oklch(0.1 0.01 240);
|
||||||
--popover-foreground: oklch(0.9889 0.004 286.33);
|
--popover-foreground: oklch(0.94 0.004 240);
|
||||||
--primary: oklch(0.7044 0.184 22.51);
|
--primary: oklch(0.55 0.22 240);
|
||||||
--primary-foreground: oklch(0.18 0.01 286.33);
|
--primary-foreground: oklch(0.06 0.008 240);
|
||||||
--secondary: oklch(0.36 0.005 271.31);
|
--secondary: oklch(0.16 0.01 240);
|
||||||
--secondary-foreground: oklch(0.9889 0.004 286.33);
|
--secondary-foreground: oklch(0.94 0.004 240);
|
||||||
--muted: oklch(0.25 0.01 286.33);
|
--muted: oklch(0.12 0.01 240);
|
||||||
--muted-foreground: oklch(0.7 0.01 286.33);
|
--muted-foreground: oklch(0.6 0.01 240);
|
||||||
--accent: oklch(0.8034 0.234 27.23);
|
--accent: oklch(0.62 0.28 10);
|
||||||
--accent-foreground: oklch(0.18 0.01 286.33);
|
--accent-foreground: oklch(0.06 0.008 240);
|
||||||
--destructive: oklch(0.65 0.18 27.23);
|
--destructive: oklch(0.65 0.3 15);
|
||||||
--destructive-foreground: oklch(0.18 0.01 286.33);
|
--destructive-foreground: oklch(0.06 0.008 240);
|
||||||
--border: oklch(0.25 0.01 286.33);
|
--border: oklch(0.18 0.01 240);
|
||||||
--input: oklch(0.22 0.01 286.33);
|
--input: oklch(0.14 0.01 240);
|
||||||
--ring: oklch(0.8034 0.234 27.23);
|
--ring: oklch(0.55 0.22 240);
|
||||||
--chart-1: oklch(0.7044 0.184 22.51);
|
--chart-1: oklch(0.55 0.22 240);
|
||||||
--chart-2: oklch(0.8034 0.234 27.23);
|
--chart-2: oklch(0.62 0.28 10);
|
||||||
--chart-3: oklch(0.36 0.005 271.31);
|
--chart-3: oklch(0.58 0.2 260);
|
||||||
--chart-4: oklch(0.7 0.15 120);
|
--chart-4: oklch(0.6 0.25 350);
|
||||||
--chart-5: oklch(0.7 0.15 300);
|
--chart-5: oklch(0.56 0.18 220);
|
||||||
--sidebar: oklch(0.22 0.01 286.33);
|
--sidebar: oklch(0.08 0.01 240);
|
||||||
--sidebar-foreground: oklch(0.9889 0.004 286.33);
|
--sidebar-foreground: oklch(0.94 0.004 240);
|
||||||
--sidebar-primary: oklch(0.7044 0.184 22.51);
|
--sidebar-primary: oklch(0.55 0.22 240);
|
||||||
--sidebar-primary-foreground: oklch(0.18 0.01 286.33);
|
--sidebar-primary-foreground: oklch(0.06 0.008 240);
|
||||||
--sidebar-accent: oklch(0.8034 0.234 27.23);
|
--sidebar-accent: oklch(0.62 0.28 10);
|
||||||
--sidebar-accent-foreground: oklch(0.18 0.01 286.33);
|
--sidebar-accent-foreground: oklch(0.06 0.008 240);
|
||||||
--sidebar-border: oklch(0.25 0.01 286.33);
|
--sidebar-border: oklch(0.18 0.01 240);
|
||||||
--sidebar-ring: oklch(0.8034 0.234 27.23);
|
--sidebar-ring: oklch(0.55 0.22 240);
|
||||||
}
|
}
|
||||||
|
|
||||||
@theme inline {
|
@theme inline {
|
||||||
|
|||||||
Reference in New Issue
Block a user