model-service/model_service/model/aimodel.py
marcsello 284dfce735
All checks were successful
continuous-integration/drone/push Build is passing
Added ability to store CNN models
2020-07-28 20:19:52 +02:00

17 lines
476 B
Python

#!/usr/bin/env python3
from .db import db
from sqlalchemy.sql import func
from sqlalchemy.dialects.postgresql import UUID
import uuid
import enum
class AIModelType(enum.Enum):
SVM = 1
CNN = 2
class AIModel(db.Model):
id = db.Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4, unique=True, nullable=False)
timestamp = db.Column(db.TIMESTAMP, nullable=False, server_default=func.now())
type = db.Column(db.Enum(AIModelType), nullable=False)