Preliminary clockify support
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
from datetime import datetime
|
||||
|
||||
from peewee import (
|
||||
CompositeKey,
|
||||
SqliteDatabase,
|
||||
Model,
|
||||
CharField,
|
||||
@ -122,3 +121,33 @@ class HamsterFactKimaiImport(Model):
|
||||
class Meta:
|
||||
database = db
|
||||
table_name = "hamster_fact_kimai_imports"
|
||||
|
||||
|
||||
class ClockifyProject(Model):
|
||||
clockify_id = CharField()
|
||||
name = CharField()
|
||||
workspace_id = CharField()
|
||||
|
||||
class Meta:
|
||||
database = db
|
||||
table_name = "clockify_projects"
|
||||
|
||||
|
||||
class HamsterClockifyMapping(Model):
|
||||
hamster_activity = ForeignKeyField(HamsterActivity, backref="clockify_mappings")
|
||||
clockify_project = ForeignKeyField(ClockifyProject, backref="mappings")
|
||||
created_at = DateTimeField(default=datetime.now)
|
||||
|
||||
class Meta:
|
||||
database = db
|
||||
table_name = "hamster_clockify_mappings"
|
||||
|
||||
|
||||
class HamsterFactClockifyImport(Model):
|
||||
hamster_fact = ForeignKeyField(HamsterFact, backref="clockify_imports")
|
||||
clockify_time_entry_id = CharField()
|
||||
exported_at = DateTimeField(default=datetime.now)
|
||||
|
||||
class Meta:
|
||||
database = db
|
||||
table_name = "hamster_fact_clockify_imports"
|
||||
|
Reference in New Issue
Block a user