Commit Graph

14 Commits

Author SHA1 Message Date
javayhu
313625577c feat: remove planId from payment and subscription schema
- Created new SQL tables for account, payment, session, user, and verification to support user management and payment processing.
- Added foreign key constraints to link account, payment, and session tables to the user table for data integrity.
- Updated journal and snapshot metadata to reflect the new schema changes.
2025-04-11 01:23:13 +08:00
javayhu
3c05657fe0 feat: add userId handling and enhance payment actions & optimize the whole payment process
- Introduced userId parameter in createCheckoutAction and createPortalAction for improved user-specific session management.
- Updated components to pass userId instead of customerId, aligning with the new payment structure.
- Added new actions to retrieve active subscription and lifetime status, ensuring users can check their subscription details securely.
- Created SQL migration for new payment-related tables, establishing a robust foundation for payment management.
- Enhanced error handling and logging in payment actions for better debugging and user feedback.
2025-04-09 14:31:08 +08:00
javayhu
5753b1c28f feat: introduce payment management system and refactor related components
- Added new SQL migration to create "account", "payment", "user", and "verification" tables, establishing a foundational structure for payment management.
- Updated existing codebase to replace subscription references with payment, including hooks, providers, and actions.
- Refactored components to utilize the new payment system, enhancing clarity and maintainability.
- Removed deprecated subscription provider and related logic, streamlining the payment handling process.
- Enhanced error handling and logging for improved debugging in payment management.
2025-04-08 01:48:51 +08:00
javayhu
e59824c97b feat: add subscription type handling and update related SQL migrations
- Introduced a new column "type" in the "subscription" table to differentiate between subscription types (one-time and recurring).
- Updated existing records to set the "type" based on the presence of "subscription_id".
- Modified the "interval" column to allow null values.
- Updated SQL snapshots and journal to reflect the new migration versions.
- Enhanced the getUserLifetimeStatus action to utilize the new subscription type logic for better membership status checks.
2025-04-08 01:04:23 +08:00
javayhu
52559865ca feat: remove lifetimeMember from user schema && update fetch subscription
- Created SQL migration to drop unique constraint and columns from the user table.
- Updated journal and snapshot metadata to reflect the new migration version.
- Refactored user schema to remove the lifetimeMember field, aligning with the new subscription management logic.
- Enhanced getUserLifetimeStatus action to utilize updated subscription data structure.
2025-04-07 23:35:15 +08:00
javayhu
1e8fe818bf feat: add interval column to subscription table and update subscription event handlers
- Introduced a new "interval" column in the "subscription" table to store subscription intervals.
- Updated the journal and snapshot metadata to reflect the new schema version and changes.
- Adjusted the schema definition to include the new column for better subscription management.
2025-04-06 15:27:59 +08:00
javayhu
2248cfdc35 feat: add subscription management features and database schema updates
- Introduced new database tables for managing subscriptions and user subscriptions.
- Updated package.json with new database commands for generation, migration, and studio.
- Refactored the user schema to remove deprecated fields and added foreign key relationships.
- Enhanced Stripe payment provider logic to handle subscription creation, updates, and cancellations.
- Improved error handling and logging for subscription events.
2025-04-06 11:12:27 +08:00
javayhu
2ab25a402b feat: add subscription_status column to user table and update related schema
- Introduced a new column `subscription_status` to the user table for improved subscription management.
- Updated the user schema in the database to reflect this change.
- Added a new migration file and snapshot for versioning.
- Updated the StripeProvider to handle subscription status updates in webhook events.
2025-04-04 13:58:08 +08:00
javayhu
ab8d85be00 feat: add subscription and membership fields to user schema and update related actions
- Introduced new columns `subscription_id` and `lifetime_member` to the user table for enhanced subscription management.
- Updated the user schema in the database to reflect these changes.
- Refactored actions to utilize the new user fields for better subscription handling.
- Enhanced error handling and logging in relevant actions for improved user feedback.
- Updated translations to include new messages related to subscription status and lifetime access.
2025-04-04 10:07:39 +08:00
javayhu
acb468fd36 feat: add customerId to user table as additionalFields 2025-03-24 09:48:14 +08:00
javayhu
c577cbc933 feat: add column customerId in user table 2025-03-24 00:22:21 +08:00
javayhu
2ba2eebbaa chore: update database schema and enhance authentication features
- Add `username` column to the `user` table and enforce uniqueness constraint.
- Introduce new SQL migration file for the `username` addition.
- Update `schema.ts` to reflect changes in the `user`, `session`, and `account` tables.
- Enhance authentication client by integrating `usernameClient` plugin for better user management.
- Adjust session management settings for improved caching and freshness.
- Refactor metadata generation in the home page for consistency.
2025-03-15 00:54:13 +08:00
javayhu
897f906631 feat: add better auth plugin admin to support user role and user ban 2025-02-23 23:23:01 +08:00
javayhu
3f66a24a60 feat: set up authentication with Drizzle ORM and Better Auth 2025-02-22 21:15:41 +08:00