Draft reporting
This commit is contained in:
parent
7f255eb48a
commit
efc620aee8
5 changed files with 89 additions and 1 deletions
22
app/models/report.py
Normal file
22
app/models/report.py
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue