File size: 816 Bytes
ff3b5ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import orm
import datetime
from App.modelInit import database, models
from App.Users.Model import User


class UserTranscriptions(orm.Model):
    tablename = "userTranscriptions"
    registry = models
    fields = {
        "id": orm.Integer(primary_key=True),
        "fileName": orm.String(max_length=100, index=True),
        "youtubeLink": orm.String(max_length=100, index=True, allow_null=True),
        "taskId": orm.String(max_length=100, index=True),
        "telegramId": orm.String(max_length=100, index=True, allow_null=True),
        "user": orm.ForeignKey(User),
        "createdAt": orm.DateTime(index=True, default=datetime.datetime.now),
        "updatedAt": orm.DateTime(index=True, default=datetime.datetime.now),
        "lastLogin": orm.DateTime(index=True, default=datetime.datetime.now),
    }