wy_qcos.db.models package

Submodules

wy_qcos.db.models.base module

class wy_qcos.db.models.base.BaseTable(**kwargs)

基类:Base

Base table.

参数:

kwargs (Any)

created_at = Column(None, DateTime(), table=None, server_default=DefaultClause(<sqlalchemy.sql.functions.current_timestamp at 0x71297cfd5e50; current_timestamp>, for_update=False))
updated_at = Column(None, DateTime(), table=None, onupdate=ColumnElementColumnDefault(<sqlalchemy.sql.functions.current_timestamp at 0x71297cfd60d0; current_timestamp>), server_default=DefaultClause(<sqlalchemy.sql.functions.current_timestamp at 0x71297cfd6110; current_timestamp>, for_update=False))
class wy_qcos.db.models.base.ArrayType(*args, **kwargs)

基类:TypeDecorator

Platform-independent Array type.

参数:
  • args (Any)

  • kwargs (Any)

impl

JSON 的别名

cache_ok: bool | None = True

Using cache.

load_dialect_impl(dialect)

Load dialect impl.

process_bind_param(value, dialect)

Process bind param.

process_result_value(value, dialect)

Process result value.

class wy_qcos.db.models.base.GUID(*args, **kwargs)

基类:TypeDecorator

Platform-independent GUID type.

参数:
  • args (Any)

  • kwargs (Any)

impl

CHAR 的别名

cache_ok: bool | None = True

Using cache.

load_dialect_impl(dialect)

Load dialect impl.

process_bind_param(value, dialect)

Process bind param.

wy_qcos.db.models.user module

class wy_qcos.db.models.user.User(**kwargs)

基类:BaseTable

Users table.

id
username
hashed_password
roles
is_active
is_locked
last_login
password_changed_at
locked_until
created_at
updated_at
class wy_qcos.db.models.user.Role(**kwargs)

基类:BaseTable

Roles table.

name
permissions
description
created_at
updated_at
wy_qcos.db.models.user.create_default_role(target, connection, **kw)

Module contents