from tortoise import fields
from tortoise.models import Model


class UpworkConfig(Model):
    id = fields.IntField(pk=True)
    db_url = fields.TextField(null=True)
    access_token = fields.TextField(null=True)
    refresh_token = fields.TextField(null=True)
    token_type = fields.TextField(null=True)
    expires_in = fields.IntField(null=True)
    client_id = fields.TextField(null=True)
    client_secret = fields.TextField(null=True)
    redirect_uri = fields.TextField(null=True)
    code = fields.TextField(null=True)

    class Meta(Model.Meta):
        table = "upwork_configs"
