summaryrefslogtreecommitdiff
path: root/guard/model.py
blob: 7372da0596c479a93b8232d2c0784547e85117b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from datetime import datetime

import peewee as p

db = p.SqliteDatabase(None)


class Access(p.Model):
    class Meta:
        database = db

    id = p.PrimaryKeyField()
    token = p.CharField(null=False, index=True)
    pattern = p.CharField(null=False)
    comment = p.CharField()
    create_date = p.DateTimeField(default=datetime.now)