Skip to content

Listing schema#1

Open
Amormio25 wants to merge 3 commits intomainfrom
listing-schema
Open

Listing schema#1
Amormio25 wants to merge 3 commits intomainfrom
listing-schema

Conversation

@Amormio25
Copy link
Collaborator

Describe your changes

[ Couple of bullet points ]

  • created env and gitignore files
  • created first testing of the listing schema
    I would like some feedback though if this is how listing data is to be expected. For example, I was wondering if all fields are required, or maybe images are optional. Also I created a compound index for uniquely identifying certain listings. Would people be able to create multiple listings on same item in same lab but at different times?

Issue ticket number and link

[ Insert Link & Ticket #] <- not sure

Checklist before requesting a review

  • [ x] My code follows the style guidelines of this project
  • [ x] I have performed a self-review of my code
  • [ x] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • [ x] I have added tests that prove my fix is effective or that my feature works
  • [ x] New and existing unit tests pass locally with my changes
  • This change requires a documentation update

@Amormio25 Amormio25 requested a review from arnavjk007 as a code owner February 5, 2026 18:06
{
itemId: 1,
labId: 1,
createdAt: 1, // ask if there can be multiple listings on same item in same lab but different time
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes we will probably have same item listings at different times as they could be same item but a different/older version.

Copy link
Collaborator

@arnavjk007 arnavjk007 left a comment

Choose a reason for hiding this comment

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

We can remove the images field in the schema since we aren't implementing that until V2, and it may be too complicated to implement, so it's a feature we are on the fence about.

itemId: { type: String, required: true },
labId: { type: String, required: true },
quantityAvailable: { type: Number, required: true },
images: { type: [String], required: false },
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think for now we can leave images out of the schema since it is a V2 feature.

@Amormio25
Copy link
Collaborator Author

I've pushed the requested change @arnavjk007

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.

2 participants