From e4e413ede34a2ae306ddd130324435d0e735f064 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sat, 9 May 2015 00:07:35 +0200 Subject: influxdb-guard --- guard/model.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 guard/model.py (limited to 'guard/model.py') 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) -- cgit v1.2.1