diff options
Diffstat (limited to 'guard/model.py')
-rw-r--r-- | guard/model.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/guard/model.py b/guard/model.py new file mode 100644 index 0000000..7372da0 --- /dev/null +++ b/guard/model.py @@ -0,0 +1,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) |