@jiway/firestorm-core - v1.1.1
    Preparing search index...

    Class FirestormPropertyMetadata<T_property_type>

    Class holding informations about how to serialize/deserialize a property of a firestorm model

    Type Parameters

    • T_property_type = any
    Index

    Constructors

    Properties

    ignored: boolean = false

    When true, the property is ignored when mapping documents

    mappedTo?: string

    Overrides the default field name of the document

    name: string

    Name of property

    Accessors

    • get defaultDocumentFieldName(): string

      Gets the default document field matched with this property

      Returns string

    • get documentFieldName(): string

      Field in the document mapped to this property

      Returns string

    • get hasConversion(): boolean

      Checks the existency of a model-to-document or document-to-model conversion for this property

      Returns boolean

    • get hasConversionToDocument(): boolean

      Checks the existency of a model to document conversion for this property

      Returns boolean

      True if a conversion exists, false otherwise.

    • get hasConversionToModel(): boolean

      Checks the existency of a document to model conversion for this property

      Returns boolean

      True if a conversion exists, false otherwise.

    Methods

    • Sets this field as being a Document relationship

      Type Parameters

      Parameters

      • targetType: Type<T_target_model>

        Type of the target

      • location: PathLike

        Location of target

      • documentId: string

        The id of the document to link

      Returns void