Skip to content

Kata asing

KataAsing

Bases: BaseAttachmentDataTable

Foreign Word model to attach to meaning from Konsep via KataAsingXKonsep.

Field

  • nama (TextField): the word
    • null: False
  • bahasa (TextField): the language the word belongs to

Attr

Source code in samudra/models/core/kata_asing.py
class KataAsing(BaseAttachmentDataTable):
    """Foreign Word model to attach to meaning from [`Konsep`][samudra.models.core.konsep.Konsep] via [`KataAsingXKonsep`][samudra.models.core.kata_asing.KataAsingXKonsep].

    ## Field
    - `nama` (TextField): the word
        * null: False
    - `bahasa` (TextField): the language the word belongs to

    ## Attr
    - `connection_table` ([`BaseRelationshipTable`][samudra.models.base.BaseRelationshipTable]) = [`KataAsingXKonsep`][samudra.models.core.kata_asing.KataAsingXKonsep]
    """

    nama = TextField(null=False)
    bahasa = TextField(null=False)

KataAsingXKonsep

Bases: BaseRelationshipTable

A many-to-many relationship between KataAsing and Konsep.

Fields

  • KataAsing (ForeignKeyField): foreign key to KataAsing.
    • field: KataAsing.id
    • backref: KataAsing.konsep
    • on delete: cascade
  • konsep (ForeignKeyField): foreign key to konsep.
    • field: Konsep.id
    • backref: Konsep.kata_asing
    • on delete: cascade
Source code in samudra/models/core/kata_asing.py
class KataAsingXKonsep(BaseRelationshipTable):
    """A many-to-many relationship between [`KataAsing`][samudra.models.core.kata_asing.KataAsing] and [`Konsep`][samudra.models.core.konsep.Konsep].

    ## Fields
    - `KataAsing` (ForeignKeyField): foreign key to [`KataAsing`][samudra.models.core.kata_asing.KataAsing].
        * field: `KataAsing.id`
        * backref: `KataAsing.konsep`
        * on delete: cascade
    - `konsep` (ForeignKeyField): foreign key to [`konsep`][samudra.models.core.konsep.Konsep].
        * field: `Konsep.id`
        * backref: `Konsep.kata_asing`
        * on delete: cascade
    """

    kata_asing = ForeignKeyField(
        KataAsing, field=KataAsing.id, backref="konsep", on_delete="cascade"
    )
    konsep = ForeignKeyField(
        Konsep, field=Konsep.id, backref="kata_asing", on_delete="cascade"
    )