@@ -41,16 +41,23 @@ model Session {
4141}
4242
4343model User {
44- id String @id @default (cuid () )
44+ id String @id @default (cuid () )
4545 name String ?
46- email String ? @unique
46+ email String ? @unique
4747 emailVerified DateTime ?
48- image String ?
49- createdAt DateTime @default (now () )
50- updatedAt DateTime @default (now () ) @updatedAt
51- slug String ? @unique
52- accounts Account []
53- sessions Session []
48+ createdAt DateTime @default (now () )
49+ updatedAt DateTime @default (now () ) @updatedAt
50+ siteTitle String ? // Used for SEO and open graph tags.
51+ siteImage String ? // Used for open graph tags. Should be a URL.
52+ slug String ? @unique // Used for profile URL.
53+ title String ? // Used for profile title, e.g. "Senior Software Engineer"
54+ displayEmail String ? // Used for contact email, displayed on profile.
55+ location String ? // Used for location, displayed on profile. Should be a general value, e.g. City, State.
56+ accounts Account [] // Linked authentication providers.
57+ sessions Session [] // Active sessions.
58+ SkillForUser SkillForUser [] // One-to-many relationship with SkillForUser, customized skills per user.
59+ Company Company [] // One-to-many relationship with Company, work experience. Can be multiple companies.
60+ Education Education [] // One-to-many relationship with Education, education history. Can be multiple schools.
5461}
5562
5663model VerificationToken {
@@ -60,3 +67,88 @@ model VerificationToken {
6067
6168 @@unique ([identifier , token ] )
6269}
70+
71+ // Skill is a general skill that can be used by multiple users, e.g. "HTML", "CSS", "JavaScript"
72+ // Not limited to technical skills. Can be used for any skill, e.g. "Public Speaking", "Leadership"
73+ model Skill {
74+ id String @id @default (cuid () )
75+ name String
76+ icon String ? // Optional icon, e.g., from Iconify.
77+ SkillForUser SkillForUser [] // One-to-many relationship with SkillForUser
78+ }
79+
80+ // SkillForUser is a specific skill that a user has, e.g. "HTML", "CSS", "JavaScript", with additional
81+ // customized information, e.g. description, icon, yearStarted, totalYears. The custom data is specific
82+ // to the user's resume. The skill itself is a general skill that can be used by multiple users.
83+ model SkillForUser {
84+ id String @id @default (cuid () )
85+ skill Skill @relation (fields : [skillId ] , references : [id ] , onDelete : Cascade )
86+ skillId String
87+ user User @relation (fields : [userId ] , references : [id ] , onDelete : Cascade )
88+ userId String
89+ description String ? // Optional meta about the skill for this user
90+ icon String ? // Optional icon, e.g., from Iconify, overrides the icon in Skill if found.
91+ yearStarted Int ? // Optional start year of using the skill
92+ totalYears Int ? // Optional total years using the skill
93+ SkillForProject SkillForProject []
94+ }
95+
96+ // SkillForProject is a specific skill that a user has for a specific project, e.g. "HTML", "CSS", "JavaScript",
97+ // with additional customized information, e.g. description. The custom data is specific to the user's resume, within
98+ // the context of the project. The skill itself is a general skill that can be used by multiple users.
99+ model SkillForProject {
100+ id String @id @default (cuid () )
101+ skillForUser SkillForUser @relation (fields : [skillForUserId ] , references : [id ] , onDelete : Cascade )
102+ skillForUserId String
103+ description String ? // Optional meta about the skill for this project. Overrides the description in SkillForUser if found.
104+ project Project @relation (fields : [projectId ] , references : [id ] , onDelete : Cascade )
105+ projectId String
106+ }
107+
108+ // Project is a project that a user has worked on, e.g. "Personal Portfolio", "Company Website", and is specific
109+ // to the context within the Company. The project can have multiple skills associated with it, e.g. "HTML", "CSS", "JavaScript".
110+ model Project {
111+ id String @id @default (cuid () )
112+ name String
113+ description String ?
114+ skillsForProject SkillForProject []
115+ Position Position ? @relation (fields : [positionId ] , references : [id ] )
116+ positionId String ?
117+ }
118+
119+ // Position is a position that a user has worked in, e.g. "Software Engineer", "Product Manager", and is specific
120+ // to the context within the Company. The position can have multiple projects associated with it, e.g. "Personal Portfolio",
121+ // "Company Website".
122+ model Position {
123+ id String @id @default (cuid () )
124+ title String
125+ startDate DateTime
126+ endDate DateTime ?
127+ projects Project []
128+ Company Company ? @relation (fields : [companyId ] , references : [id ] )
129+ companyId String ?
130+ }
131+
132+ // Company is a company that a user has worked at, e.g. "Google", "Facebook", and is specific to the context within
133+ // the user's resume. The company can have multiple positions associated with it, e.g. "Software Engineer", "Product Manager".
134+ model Company {
135+ id String @id @default (cuid () )
136+ name String
137+ location String
138+ startDate DateTime
139+ endDate DateTime ?
140+ positions Position []
141+ user User @relation (fields : [userId ] , references : [id ] , onDelete : Cascade )
142+ userId String
143+ }
144+
145+ // Education is a school that a user has attended, e.g. "Harvard University", "Stanford University", and is specific
146+ // to the context within the user's resume. For multiple degrees from the same school, the user can add multiple education entries.
147+ model Education {
148+ id String @id @default (cuid () )
149+ school String
150+ degree String
151+ dateAwarded DateTime ?
152+ user User @relation (fields : [userId ] , references : [id ] , onDelete : Cascade )
153+ userId String
154+ }
0 commit comments