Mbonea's picture
test
b8952b7
raw
history blame
992 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=""),
"file_name": orm.String(max_length=100, index=True, default=""),
"language": orm.String(max_length=100, index=True, default="-"),
"youtubeLink": orm.String(max_length=100, index=True, allow_null=True),
"tl_file_id": orm.String(
max_length=100, index=True, default="", allow_null=True
),
"duration": orm.Integer(index=True, default=0),
"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"),
}