#!/usr/bin/env python3 import db from sqlalchemy.sql import func """ Flask Restful endpoints """ __author__ = '@tormakris' __copyright__ = "Copyright 2020, Birbnetes Team" __module_name__ = "models" __version__text__ = "1" class SampleMetadata(db.Model): """ SQLAlchemy model of metadata entries """ id = db.Column(db.Integer, primary_key=True, auto_increment=True) timestamp = db.Column(db.TIMESTAMP, nullable=False, server_default=func.now()) device_id = db.Column(db.Integer, nullable=False) device_date = db.Column(db.DateTime, nullable=False) tag = db.Column(db.String(32), nullable=False, unique=True)