diff --git a/invenio/modules/checker/__init__.py b/invenio/modules/checker/__init__.py new file mode 100644 index 000000000..7b3253788 --- /dev/null +++ b/invenio/modules/checker/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +## +## This file is part of Invenio. +## Copyright (C) 2014 CERN. +## +## Invenio is free software; you can redistribute it and/or +## modify it under the terms of the GNU General Public License as +## published by the Free Software Foundation; either version 2 of the +## License, or (at your option) any later version. +## +## Invenio is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Invenio; if not, write to the Free Software Foundation, Inc., +## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +"""Implement checker module.""" diff --git a/invenio/modules/checker/models.py b/invenio/modules/checker/models.py new file mode 100644 index 000000000..76b3c9d56 --- /dev/null +++ b/invenio/modules/checker/models.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +## +## This file is part of Invenio. +## Copyright (C) 2014 CERN. +## +## Invenio is free software; you can redistribute it and/or +## modify it under the terms of the GNU General Public License as +## published by the Free Software Foundation; either version 2 of the +## License, or (at your option) any later version. +## +## Invenio is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Invenio; if not, write to the Free Software Foundation, Inc., +## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +"""Database models for Checker module.""" + +# General imports. + +from invenio.ext.sqlalchemy import db + +# Create your models here. + + +class Rules(db.Model): + + """Represent runnable rules.""" + + __tablename__ = 'bibcheck_rules' + name = db.Column(db.String(150), primary_key=True) + last_run = db.Column(db.DateTime, nullable=False, + server_default='0001-01-01') + +__all__ = ('Rules', )