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

Company request schema #111

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Company request schema #111

wants to merge 4 commits into from

Conversation

suxls
Copy link
Contributor

@suxls suxls commented Jan 26, 2025

Created a company request schema and role request schema.

Admin should be able to approve new introduced company and roles, therefore we are introducing a new company and role request schema. The schema has all the information needed to create a company/role, profile that request the new role, time it was requested, and the status of the request.

Closes #109

How has this been tested?

haha

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • I have moved the ticket to "In Review"
  • 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.

Copy link

vercel bot commented Jan 26, 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 2, 2025 9:21pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cooper-auth ⬜️ Skipped (Inspect) Feb 2, 2025 9:21pm
cooper-docs ⬜️ Skipped (Inspect) Feb 2, 2025 9:21pm

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.

cooper to the 🌔 🚀

@@ -0,0 +1,47 @@
import { relations, sql } from "drizzle-orm";
Copy link
Contributor

Choose a reason for hiding this comment

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

To get the linter to pass you'll just need to remove sql from the import statement

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

id: true,
createdAt: true,
});
// Example TypeScript type for the Company Request
Copy link
Contributor

Choose a reason for hiding this comment

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

super nit pick (i.e. don't have to change) but I don't know what this comment means 💀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea i dont either

@@ -0,0 +1,48 @@
import { relations, sql } from "drizzle-orm";
Copy link
Contributor

Choose a reason for hiding this comment

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

same here for the sql thing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

packages/db/src/schema/roleRequest.ts Show resolved Hide resolved
}));

/*
What is the relationship between companyRequest/roleRequest/company/role
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is perfect!

  • Each company request is attached to a profile (and it also includes the role parameters in the schema)
  • Each role request is attached to a company and a profile!

So we can probs remove these comments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

bet

Copy link
Contributor

@gpalmer27 gpalmer27 left a comment

Choose a reason for hiding this comment

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

Looks good to me

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) Create Schema for Company Request and Role Request
3 participants