@@ -39,7 +39,7 @@ export const CompanySchema = z.object({
3939 * Links Profiles to Companies and defines their role within that company. 
4040 */  
4141export   const   CompanyMemberSchema =  z .object ({
42-   companyId: z .string (). uuid (), //  Foreign key to CompanySchema.id
42+   companyId: z .uuid (), //  Foreign key to CompanySchema.id
4343  profileId: nonEmptyString , //  Foreign key to ProfileSchema.id (Clerk User ID)
4444  role: CompanyRoleEnum ,
4545  createdAt: z .date ().default (() =>  new  Date ()),
@@ -50,7 +50,7 @@ export const CompanyMemberSchema = z.object({
5050 * Manages the list of candidate sources for a specific company. 
5151 */  
5252export   const   SourceSchema =  z .object ({
53-   companyId: z .string (). uuid (), //  Foreign key to CompanySchema.id
53+   companyId: z .uuid (), //  Foreign key to CompanySchema.id
5454  name: nonEmptyString , //  e.g., "LinkedIn", "Referral"
5555  order: z .number ().int ().positive ().default (1 ),
5656});
@@ -60,7 +60,7 @@ export const SourceSchema = z.object({
6060 * Manages the list of user-defined seniority levels for a specific company. 
6161 */  
6262export   const   SenioritySchema =  z .object ({
63-   companyId: z .string (). uuid (), //  Foreign key to CompanySchema.id
63+   companyId: z .uuid (), //  Foreign key to CompanySchema.id
6464  name: nonEmptyString , //  e.g., "Intern", "Senior Engineer"
6565  order: z .number ().int ().positive ().default (1 ),
6666  createdAt: z .date ().default (() =>  new  Date ()),
@@ -75,7 +75,7 @@ export const SenioritySchema = z.object({
7575 * Manages the list of user-defined hiring stages for a specific company. 
7676 */  
7777export   const   KanbanStageSchema =  z .object ({
78-   companyId: z .string (). uuid (), //  Foreign key to CompanySchema.id
78+   companyId: z .uuid (), //  Foreign key to CompanySchema.id
7979  name: nonEmptyString , //  e.g., "Applied", "Technical Interview"
8080  order: z .number ().int ().positive ().default (1 ),
8181  createdAt: z .date ().default (() =>  new  Date ()),
@@ -90,7 +90,7 @@ export const KanbanStageSchema = z.object({
9090 * Manages the list of user-defined job roles for a specific company. 
9191 */  
9292export   const   RoleSchema =  z .object ({
93-   companyId: z .string (). uuid (), //  Foreign key to CompanySchema.id
93+   companyId: z .uuid (), //  Foreign key to CompanySchema.id
9494  name: nonEmptyString , //  e.g., "Software Engineer", "Product Manager"
9595  order: z .number ().int ().positive ().default (1 ),
9696  createdAt: z .date ().default (() =>  new  Date ()),
@@ -105,7 +105,7 @@ export const RoleSchema = z.object({
105105 * Central table for all candidate information, scoped to a company. 
106106 */  
107107export   const   CandidateSchema =  z .object ({
108-   companyId: z .string (). uuid (), //  Foreign key to CompanySchema.id
108+   companyId: z .uuid (), //  Foreign key to CompanySchema.id
109109  name: nonEmptyString ,
110110  email: z 
111111    .string ()
@@ -118,14 +118,14 @@ export const CandidateSchema = z.object({
118118    .url ({ message: " Invalid URL"   })
119119    .optional ()
120120    .nullable (),
121-   resumeUrl: z .string (). url ({ message: " Invalid URL"   }).optional ().nullable (), //  URL from UploadThing (@https://uploadthing.com/)
121+   resumeUrl: z .url ({ message: " Invalid URL"   }).optional ().nullable (), //  URL from UploadThing (@https://uploadthing.com/)
122122  targetTeam: z .string ().optional ().nullable (),
123-   roleId: z .string (). uuid (), //  Foreign key to RoleSchema.id
124-   seniorityId: z .string (). uuid (), //  Foreign key to SenioritySchema.id
125-   kanbanStageId: z .string (). uuid (), //  Foreign key to KanbanStageSchema.id
123+   roleId: z .uuid (), //  Foreign key to RoleSchema.id
124+   seniorityId: z .uuid (), //  Foreign key to SenioritySchema.id
125+   kanbanStageId: z .uuid (), //  Foreign key to KanbanStageSchema.id
126126  salaryExpectations: z .string ().optional ().nullable (),
127127  nextSteps: z .string ().optional ().nullable (),
128-   sourceId: z .string (). uuid ().optional ().nullable (), //  Foreign key to SourceSchema.id
128+   sourceId: z .uuid ().optional ().nullable (), //  Foreign key to SourceSchema.id
129129  addedByProfileId: nonEmptyString , //  Clerk User ID of the user who added the candidate
130130  updatedAt: z 
131131    .date ()
@@ -138,7 +138,7 @@ export const CandidateSchema = z.object({
138138 * Stores structured templates for interview notes, scoped to a company. 
139139 */  
140140export   const   InterviewNoteTemplateSchema =  z .object ({
141-   companyId: z .string (). uuid (), //  Foreign key to CompanySchema.id
141+   companyId: z .uuid (), //  Foreign key to CompanySchema.id
142142  name: nonEmptyString , //  e.g., "Technical Interview Template"
143143  templateFields: z .record (z .string (), z .any ()).default ({}),
144144  createdAt: z .date ().default (() =>  new  Date ()),
@@ -154,11 +154,11 @@ export const InterviewNoteTemplateSchema = z.object({
154154 * Implicitly scoped to a company via candidate_id. 
155155 */  
156156export   const   InterviewSchema =  z .object ({
157-   candidateId: z .string (). uuid (), //  Foreign key to CandidateSchema.id
157+   candidateId: z .uuid (), //  Foreign key to CandidateSchema.id
158158  interviewType: z .string ().optional ().nullable (),
159159  interviewDate: z .date ().optional ().nullable (),
160160  interviewers: z .array (nonEmptyString ).default ([]),
161-   assignedTemplateId: z .string (). uuid ().optional ().nullable (),
161+   assignedTemplateId: z .uuid ().optional ().nullable (),
162162  notesContent: z .record (z .string (), z .any ()).optional ().nullable (),
163163  recordedByProfileId: nonEmptyString , //  Clerk User ID of user who recorded the interview
164164  createdAt: z .date ().default (() =>  new  Date ()),
0 commit comments