Skip to content

Commit

Permalink
refactor: 重构checkin表
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Jan 26, 2025
1 parent 2b6afc0 commit c086186
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
TextField,
DateTimeField,
IntegerField,
ForeignKeyField,
BooleanField,
)
from playhouse.shortcuts import ReconnectMixin

Expand Down Expand Up @@ -67,7 +67,7 @@ class Bill(Model):
expired_at = DateTimeField()

# from backend
cdk = CharField(unique=True)
cdk = CharField()

class Meta:
database = db
Expand All @@ -76,11 +76,13 @@ class Meta:


class CheckIn(Model):
cdk = ForeignKeyField(Bill, field="cdk", backref="check_in", primary_key=True)
cdk = CharField()
activated_at = DateTimeField()
actually_paid = CharField()
application = CharField()
module = CharField()
user_agent = CharField()
renew = BooleanField(default=False)

class Meta:
database = db
Expand Down

0 comments on commit c086186

Please sign in to comment.