Integrate ai.card Rust API with ai.gpt MCP and implement daily limit system
### Major Changes: - **Rust Migration**: Move api-rs to root directory, rename binary to 'aicard' - **MCP Integration**: Add card tools to ai.gpt MCP server (get_user_cards, draw_card, get_draw_status) - **Daily Limit System**: Implement 2-day interval card drawing limits in API and iOS - **iOS Enhancements**: Add DrawStatusView, backup functionality, and limit integration ### Technical Details: - ai.gpt MCP now has 20 tools including 3 card-related tools - ServiceClient enhanced with missing card API methods - iOS app includes daily limit UI and atproto OAuth backup features - Database migration for last_draw_date field - Complete feature parity between web and iOS implementations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
26
api/alembic/versions/001_add_last_draw_date.py
Normal file
26
api/alembic/versions/001_add_last_draw_date.py
Normal file
@ -0,0 +1,26 @@
|
||||
"""Add last_draw_date to users table
|
||||
|
||||
Revision ID: 001_add_last_draw_date
|
||||
Revises:
|
||||
Create Date: 2025-06-08 12:00:00.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '001_add_last_draw_date'
|
||||
down_revision: Union[str, None] = None
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Add last_draw_date column to users table for daily draw limits"""
|
||||
op.add_column('users', sa.Column('last_draw_date', sa.DateTime(), nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Remove last_draw_date column from users table"""
|
||||
op.drop_column('users', 'last_draw_date')
|
Reference in New Issue
Block a user