feat: time tracking / work logs (create, list, summary, project summary, CLI commands)
This commit is contained in:
15
app/models/worklog.py
Normal file
15
app/models/worklog.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from sqlalchemy import Column, Integer, Text, DateTime, ForeignKey, Float
|
||||
from sqlalchemy.sql import func
|
||||
from app.core.config import Base
|
||||
|
||||
|
||||
class WorkLog(Base):
|
||||
__tablename__ = "work_logs"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
issue_id = Column(Integer, ForeignKey("issues.id"), nullable=False)
|
||||
user_id = Column(Integer, ForeignKey("users.id"), nullable=False)
|
||||
hours = Column(Float, nullable=False) # Hours spent
|
||||
description = Column(Text, nullable=True)
|
||||
logged_date = Column(DateTime(timezone=True), nullable=False) # When the work was done
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
Reference in New Issue
Block a user