Class tigrbl_auth.orm.service.Service
tigrbl_auth.orm.service.Service
Bases: Base
, GUIDPk
, Timestamped
, TenantBound
, Principal
, ActiveToggle
Machine principal representing an automated service.
name
class-attribute
instance-attribute
name = acol(
spec=ColumnSpec(
storage=S(
String(120), unique=True, nullable=False
),
field=F(
constraints={"max_length": 120},
required_in=("create",),
),
io=IO(
in_verbs=("create", "update", "replace"),
out_verbs=("read", "list"),
filter_ops=("eq", "ilike"),
sortable=True,
),
)
)
is_active
class-attribute
instance-attribute
is_active = acol(
spec=ColumnSpec(
storage=S(
type_=Boolean, default=True, nullable=False
),
field=F(py_type=bool),
io=CRUD_IO,
)
)
created_at
class-attribute
instance-attribute
created_at = acol(
spec=ColumnSpec(
storage=S(
type_=TZDateTime,
default=tzutcnow,
nullable=False,
),
field=F(py_type=datetime),
io=RO_IO,
)
)
updated_at
class-attribute
instance-attribute
updated_at = acol(
spec=ColumnSpec(
storage=S(
type_=TZDateTime,
default=tzutcnow,
onupdate=tzutcnow,
nullable=False,
),
field=F(py_type=datetime),
io=RO_IO,
)
)
id
class-attribute
instance-attribute
id = acol(
spec=ColumnSpec(
storage=S(
type_=PgUUID(as_uuid=True),
primary_key=True,
default=uuid4,
),
field=F(
py_type=UUID,
constraints={"examples": [uuid_example]},
),
io=RO_IO,
)
)
metadata
class-attribute
instance-attribute
metadata = MetaData(
naming_convention={
"pk": "pk_%(table_name)s",
"fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s",
"ix": "ix_%(table_name)s_%(column_0_name)s",
"uq": "uq_%(table_name)s_%(column_0_name)s",
"ck": "ck_%(table_name)s_%(column_0_name)s_%(constraint_type)s",
}
)
is_visible
staticmethod
is_visible(obj, ctx)
Source code in tigrbl/orm/mixins/tenant_bound.py
110 111 112 |
|
tenant_id
tenant_id()
Source code in tigrbl/orm/mixins/tenant_bound.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|