You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
554 B
Python
20 lines
554 B
Python
from datetime import datetime
|
|
from sqlalchemy import func
|
|
from app.factory import db
|
|
|
|
|
|
class WorkEvent(db.Model):
|
|
__tablename__ = 'work_events'
|
|
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
create_date = db.Column(db.DateTime, server_default=func.now())
|
|
user = db.Column(db.String(50))
|
|
slack_channel = db.Column(db.String(50))
|
|
work_type = db.Column(db.String(50))
|
|
start_date = db.Column(db.DateTime)
|
|
end_date = db.Column(db.DateTime)
|
|
hours_spent = db.Column(db.Integer)
|
|
|
|
def __repr__(self):
|
|
return self.id
|