model-service/model_service/model/aimodel.py

19 lines
590 B
Python
Raw Normal View History

2020-04-14 02:01:44 +02:00
#!/usr/bin/env python3
from .db import db
from sqlalchemy.sql import func
2020-04-14 13:48:11 +02:00
from sqlalchemy.dialects.postgresql import UUID
import uuid
2020-04-14 02:01:44 +02:00
2020-04-14 13:48:11 +02:00
class AIModel(db.Model):
id = db.Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4, unique=True, nullable=False)
2020-04-14 02:01:44 +02:00
timestamp = db.Column(db.TIMESTAMP, nullable=False, server_default=func.now())
2020-04-14 13:48:11 +02:00
# details
2020-04-14 02:01:44 +02:00
mid_window = db.Column(db.Float)
mid_step = db.Column(db.Float)
short_window = db.Column(db.Float)
short_step = db.Column(db.Float)
2020-04-14 17:03:15 +02:00
compute_beat = db.Column(db.Boolean)
2020-04-14 13:48:11 +02:00
type = db.Column(db.String(15))