six-shop/member-card

会员卡包

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Type:sixshop-extension

pkg:composer/six-shop/member-card

dev-main 2025-10-04 06:14 UTC

This package is not auto-updated.

Last update: 2025-11-01 05:38:16 UTC


README

This extension implements member card functionality for the SixShop e-commerce platform, allowing users to purchase membership cards with specific pricing and validity periods.

Features

  • Member card management (create, read, update, delete)
  • Member card order management
  • Member management with membership status tracking
  • Configurable pricing and validity periods for membership cards

Installation

The extension is automatically loaded by the SixShop system. Ensure that the extension is properly registered in your SixShop installation.

Database Structure

The extension uses the following database tables:

  • mcard_member_card - Member card definitions (pricing, validity periods)
  • mcard_member_card_order - Member card orders (purchase history)
  • mcard_member - Member records (user membership status)

Migration files are located in the database/migrations directory:

  1. 20251004000001_create_member_card_table.php - Creates the member card definitions table
  2. 20251004000002_create_member_card_order_table.php - Creates the member card orders table
  3. 20251004000003_create_member_table.php - Creates the member management table

API Endpoints

Admin Routes

Admin routes are prefixed with /admin/six-shop-member-card/.

API Routes

API routes are prefixed with /api/six-shop-member-card/.

Authentication middleware should be added to routes as needed:

->middleware(['auth'])

Configuration

The extension configuration can be found in config.php.

Directory Structure

.
├── config.php              # Extension configuration
├── composer.json           # Composer configuration
├── info.php                # Extension metadata
├── README.md               # This file
├── database/
│   └── migrations/         # Database migration files
├── route/
│   ├── admin.php           # Admin routes
│   └── api.php             # API routes
└── src/
    └── Extension.php       # Extension main class

Usage

After installation, the member card functionality will be available through the admin panel and API endpoints. Admins can:

  1. Create and manage different types of membership cards with varying prices and validity periods
  2. View member card orders and purchase history
  3. Manage members and their membership status

Extending the Extension

To extend the functionality:

  1. Add new migration files to database/migrations for any additional database tables
  2. Add new routes to route/admin.php or route/api.php
  3. Create new controllers and services in the src directory

Contributing

Contributions are welcome. Please follow the SixShop coding standards and submit pull requests for any enhancements.

License

This extension is licensed under the MIT License.