xn-auth 0.2.33__tar.gz → 0.2.34.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xn_auth-0.2.33/xn_auth.egg-info → xn_auth-0.2.34.dev1}/PKG-INFO +1 -1
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/x_auth/models.py +7 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1/xn_auth.egg-info}/PKG-INFO +1 -1
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/.env.dist +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/.gitignore +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/.pre-commit-config.yaml +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/README.md +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/makefile +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/pyproject.toml +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/setup.cfg +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/x_auth/controller.py +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/x_auth/enums.py +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/x_auth/exceptions.py +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/x_auth/middleware.py +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/x_auth/types.py +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/xn_auth.egg-info/SOURCES.txt +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/xn_auth.egg-info/dependency_links.txt +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/xn_auth.egg-info/requires.txt +0 -0
- {xn_auth-0.2.33 → xn_auth-0.2.34.dev1}/xn_auth.egg-info/top_level.txt +0 -0
|
@@ -4,6 +4,7 @@ from aiogram.types import User as TgUser
|
|
|
4
4
|
from aiogram.utils.web_app import WebAppUser
|
|
5
5
|
from aiohttp import ClientSession
|
|
6
6
|
from msgspec import convert
|
|
7
|
+
from pyrogram.enums.client_platform import ClientPlatform
|
|
7
8
|
from tortoise.fields import (
|
|
8
9
|
BigIntField,
|
|
9
10
|
BooleanField,
|
|
@@ -21,6 +22,8 @@ from tortoise.fields import (
|
|
|
21
22
|
ForeignKeyNullableRelation,
|
|
22
23
|
JSONField,
|
|
23
24
|
)
|
|
25
|
+
from tortoise.fields.data import CharEnumFieldInstance
|
|
26
|
+
|
|
24
27
|
from x_auth import types
|
|
25
28
|
from x_model.field import DatetimeSecField
|
|
26
29
|
from x_model.models import Model, TsTrait
|
|
@@ -151,6 +154,7 @@ class Dc(TortModel):
|
|
|
151
154
|
pub = CharField(495, null=True)
|
|
152
155
|
|
|
153
156
|
apps: BackwardFKRelation["App"]
|
|
157
|
+
sessions: BackwardFKRelation["App"]
|
|
154
158
|
|
|
155
159
|
|
|
156
160
|
class Fcm(TortModel):
|
|
@@ -169,6 +173,7 @@ class App(Model):
|
|
|
169
173
|
ver = CharField(18, default="0.0.1")
|
|
170
174
|
fcm: ForeignKeyNullableRelation[Fcm] = ForeignKeyField("models.Fcm", "apps", null=True)
|
|
171
175
|
fcm_id: int
|
|
176
|
+
platform: ClientPlatform = CharEnumFieldInstance(ClientPlatform)
|
|
172
177
|
owner: OneToOneRelation["User"] = OneToOneField("models.User", "app")
|
|
173
178
|
|
|
174
179
|
sessions: BackwardFKRelation["Session"]
|
|
@@ -178,6 +183,8 @@ class Session(TortModel):
|
|
|
178
183
|
id = CharField(85, primary_key=True)
|
|
179
184
|
api: ForeignKeyRelation[App] = ForeignKeyField("models.App", "sessions")
|
|
180
185
|
api_id: int
|
|
186
|
+
dc: ForeignKeyRelation[Dc] = ForeignKeyField("models.Dc", "sessions", default=2)
|
|
187
|
+
dc_id: int
|
|
181
188
|
test_mode = BooleanField(default=False)
|
|
182
189
|
auth_key = BinaryField(null=True)
|
|
183
190
|
date = IntField(default=0) # todo: refact to datetime?
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|