Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated roles and company schema #139

Merged
merged 3 commits into from
Feb 21, 2025
Merged

updated roles and company schema #139

merged 3 commits into from
Feb 21, 2025

Conversation

gpalmer27
Copy link
Contributor

Description

Updated the role and company schema to include averages for ratings and for pay.

Motivation and Context

Makes it so that we don't have to take a very long approach to find the average for things.

Closes #137

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [ x] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [x ] Database migration
    • [ x] Ran pnpm db:generate and verified generated SQL migration files in packages/db/drizzle

Checklist:

  • [x ] My code follows the code style of this project.
  • [x ] I have moved the ticket to "In Review"
  • [x ] I have added reviewers to this PR
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@gpalmer27 gpalmer27 requested a review from banushi-a February 21, 2025 03:22
Copy link

vercel bot commented Feb 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cooper ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 10:05pm
cooper-auth ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 10:05pm
cooper-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 10:05pm

Copy link
Contributor

@banushi-a banushi-a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🌞

}) satisfies z.ZodType<
Omit<typeof Company.$inferInsert, "id" | "createdAt" | "updatedAt">
>;
averageHourlyPay: z.number(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so decimal in drizzle still means string lmao, so we have the zod schema would have to just require them to be strings. See this

So you will have to change the create_Schema for both role and company to have z.string() for whatever we mark as decimal

Copy link
Contributor

@banushi-a banushi-a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fr this time

@gpalmer27 gpalmer27 merged commit a00b9f6 into main Feb 21, 2025
8 checks passed
@gpalmer27 gpalmer27 deleted the updated-role-schema branch February 21, 2025 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Develop) Schema for Efficient Review Aggregation
2 participants