File size: 530 Bytes
954551b
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from sqlalchemy import Column, Integer, String, Float, DateTime
from datetime import datetime
from .database import Base


class EmotionLog(Base):
    """Stores a single 10-second emotion tracking window result."""

    __tablename__ = "emotion_logs"

    id = Column(Integer, primary_key=True, index=True)
    timestamp = Column(DateTime, nullable=False, default=datetime.utcnow, index=True)
    dominant_emotion = Column(String(50), nullable=False, index=True)
    duration_seconds = Column(Float, nullable=False, default=10.0)