File size: 668 Bytes
252d749
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import asyncio
import orm
import psycopg2
import datetime
import ujson
import pydantic
from passlib.context import CryptContext
from App.modelInit import database, models


class Transcriptions(orm.Model):
    tablename = "transcriptions"
    registry = models
    fields = {
        "id": orm.Integer(primary_key=True),
        "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"),
    }