Mbonea's picture
created entries to the db
61061b5
raw
history blame
671 Bytes
import orm
import datetime
from App.modelInit import database, models
from App.Users.Model import User
class Transcriptions(orm.Model):
tablename = "transcriptions"
registry = models
fields = {
"id": orm.Integer(primary_key=True),
"task_id": orm.String(max_length=100, index=True, default=""),
"tl_file_id": orm.String(max_length=100, index=True, default=""),
"user": orm.ForeignKey(User, on_delete=orm.CASCADE),
"createdAt": orm.DateTime(index=True, default=datetime.datetime.now),
"content": orm.JSON(default={}),
"transcription_state": orm.String(max_length=100, index=True, default="qued"),
}