Draft reporting

This commit is contained in:
Yax 2015-09-06 18:58:07 +02:00
parent 7f255eb48a
commit efc620aee8
5 changed files with 89 additions and 1 deletions

22
app/models/report.py Normal file
View file

@ -0,0 +1,22 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-
from peewee import Model
from peewee import CharField
from peewee import BooleanField
from peewee import ForeignKeyField
from app.services.database import get_db
from app.models.site import Site
class Report(Model):
name = CharField(unique=True)
email = CharField()
url = CharField()
published = BooleanField()
rejected = BooleanField()
subscribed = BooleanField()
unsubscribed = BooleanField()
site = ForeignKeyField(Site, related_name='report_site')
class Meta:
database = get_db()