Skip to content

Conversation

@maxmux-xyz
Copy link

  • Introduced a new ItemPurchase model to the SQL database, which includes fields for id, item_id, user_id, quantity, and created_at.
  • Implemented foreign key relationships for item_id and user_id with cascade deletion.
  • Added validation to ensure quantity is greater than or equal to 1.
  • Default value for created_at set to the current timestamp in UTC format.

- Introduced a new `ItemPurchase` model to the SQL database, which includes fields for `id`, `item_id`, `user_id`, `quantity`, and `created_at`.
- Implemented foreign key relationships for `item_id` and `user_id` with cascade deletion.
- Added validation to ensure `quantity` is greater than or equal to 1.
- Default value for `created_at` set to the current timestamp in UTC format.
@maxmux-xyz maxmux-xyz closed this Nov 19, 2025
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.

1 participant