mirror of
https://github.com/Xevion/linkpulse.git
synced 2025-12-07 18:07:30 -06:00
13 lines
360 B
Python
13 lines
360 B
Python
from peewee import Model, CharField, DateTimeField, IntegerField
|
|
from playhouse.db_url import connect
|
|
from os import environ
|
|
|
|
class BaseModel(Model):
|
|
class Meta:
|
|
database = connect(url=environ.get('DATABASE_URL'))
|
|
|
|
|
|
class IPAddress(BaseModel):
|
|
ip = CharField(primary_key=True)
|
|
last_seen = DateTimeField()
|
|
count = IntegerField(default=0) |