xn-model 0.11.0__tar.gz → 0.11.1__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_model-0.11.0/xn_model.egg-info → xn_model-0.11.1}/PKG-INFO +1 -1
- {xn_model-0.11.0 → xn_model-0.11.1}/x_model/model.py +3 -5
- {xn_model-0.11.0 → xn_model-0.11.1/xn_model.egg-info}/PKG-INFO +1 -1
- {xn_model-0.11.0 → xn_model-0.11.1}/.env.sample +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/.gitignore +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/.pre-commit-config.yaml +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/README.md +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/makefile +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/pyproject.toml +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/setup.cfg +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/tests/__init__.py +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/tests/test_db.py +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/x_model/__init__.py +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/x_model/field.py +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/x_model/func.py +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/x_model/pydantic.py +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/xn_model.egg-info/SOURCES.txt +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/xn_model.egg-info/dependency_links.txt +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/xn_model.egg-info/requires.txt +0 -0
- {xn_model-0.11.0 → xn_model-0.11.1}/xn_model.egg-info/top_level.txt +0 -0
|
@@ -15,13 +15,11 @@ class BaseModel(TortoiseModel):
|
|
|
15
15
|
# todo: refact: clean old garbage
|
|
16
16
|
id: int = fields.IntField(True)
|
|
17
17
|
|
|
18
|
-
_name: tuple[str] =
|
|
19
|
-
_sorts: tuple[str] =
|
|
18
|
+
_name: tuple[str] = ("name",)
|
|
19
|
+
_sorts: tuple[str] = ("-id",)
|
|
20
20
|
|
|
21
21
|
def repr(self, sep: str = " ") -> str:
|
|
22
|
-
|
|
23
|
-
return sep.join(getattr(self, name_fragment) for name_fragment in self._name)
|
|
24
|
-
return self.__repr__()
|
|
22
|
+
return sep.join(getattr(self, name_fragment) for name_fragment in self._name)
|
|
25
23
|
|
|
26
24
|
@classmethod
|
|
27
25
|
async def get_or_create_by_name(cls, name: str, attr_name: str = None, def_dict: dict = None) -> TortoiseModel:
|
|
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
|
|
File without changes
|