Skip to content

Commit 17219d6

Browse files
committed
feat: plan新增字段
1 parent cd8f989 commit 17219d6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/database/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ class Plan(Model):
5151
type_id = CharField()
5252
popular = IntegerField()
5353
available = BooleanField()
54+
title = TextField()
55+
price = CharField()
56+
orignal_price = CharField()
5457

5558
class Meta:
5659
database = db

src/plan/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from datetime import datetime
2-
from fastapi import APIRouter, Request
1+
from fastapi import APIRouter
32
from loguru import logger
43
from time import time
54

@@ -37,6 +36,9 @@ async def query_anno(type_id: str = "GameTools"):
3736
"plan_id": p.plan_id,
3837
"type_id": p.type_id,
3938
"popular": p.popular,
39+
"title": p.title,
40+
"price": p.price,
41+
"orignal_price": p.orignal_price,
4042
}
4143
)
4244
else:
@@ -46,6 +48,9 @@ async def query_anno(type_id: str = "GameTools"):
4648
"plan_id": p.plan_id,
4749
"type_id": p.type_id,
4850
"popular": p.popular,
51+
"title": p.title,
52+
"price": p.price,
53+
"orignal_price": p.orignal_price,
4954
}
5055
)
5156

0 commit comments

Comments
 (0)