-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodels.py
More file actions
24 lines (21 loc) · 770 Bytes
/
models.py
File metadata and controls
24 lines (21 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import config
from peewee import *
db = MySQLDatabase(database=config.DATABASE['database'], user=config.DATABASE['username'], password=config.DATABASE['password'], host=config.DATABASE['host'])
class BaseModel(Model):
class Meta:
database = db
class Raid(BaseModel):
id = IntegerField(primary_key=True)
level = SmallIntegerField()
pokemon_id = IntegerField()
latitude = DoubleField(17, 14)
longitude = DoubleField(17, 14)
fort_id = CharField(50)
seed = BigIntegerField()
spawn_time = BigIntegerField()
battle_time = BigIntegerField()
end_time = BigIntegerField()
cp = IntegerField()
move_1 = SmallIntegerField()
move_2 = SmallIntegerField()
controlled_by = SmallIntegerField()