logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class GameProgressRecordMapping

    Maps between GameProgressData and the generic StructuredRecord shape, and builds the field-name-driven schema and scope filter StructuredStoreGameProgressAdapter needs. The single place that knows the game-progress table's column names.

    Inheritance
    object
    GameProgressRecordMapping
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameProgress.Infrastructure
    Assembly: Serenity.GameProgress.Infrastructure.dll
    Syntax
    public static class GameProgressRecordMapping

    Fields

    CompletionCountField

    Field name storing CompletionCount.

    Declaration
    public const string CompletionCountField = "completion_count"
    Field Value
    Type Description
    string

    CustomPayloadField

    Field name storing CustomPayloadJson.

    Declaration
    public const string CustomPayloadField = "custom_payload"
    Field Value
    Type Description
    string

    DefaultTableName

    The default table or collection name used when the settings leave it blank.

    Declaration
    public const string DefaultTableName = "serenity_game_progress"
    Field Value
    Type Description
    string

    GlobalPartitionValue

    The single partition value every game-progress row is stored under (progress is slot-independent).

    Declaration
    public const string GlobalPartitionValue = "global"
    Field Value
    Type Description
    string

    PartitionField

    Field name partitioning the single, global game-progress row.

    Declaration
    public const string PartitionField = "partition"
    Field Value
    Type Description
    string

    PartitionKeyFields

    The PartitionField key used to identify the single global row for upsert-if-newer.

    Declaration
    public static readonly IReadOnlyList<string> PartitionKeyFields
    Field Value
    Type Description
    IReadOnlyList<string>

    UnlockedExtrasField

    Field name storing UnlockedExtraIds, encoded as a JSON array of strings.

    Declaration
    public const string UnlockedExtrasField = "unlocked_extras"
    Field Value
    Type Description
    string

    UpdatedAtTicksField

    Field name storing UpdatedAtUtcTicks.

    Declaration
    public const string UpdatedAtTicksField = "updated_at_ticks"
    Field Value
    Type Description
    string

    Methods

    BuildGlobalScopeFilters()

    Builds the partition = "global" scope filter every game-progress operation shares.

    Declaration
    public static IReadOnlyList<FieldFilter> BuildGlobalScopeFilters()
    Returns
    Type Description
    IReadOnlyList<FieldFilter>

    BuildSchema(StoreTable)

    Builds the game-progress table schema: fields and the partition index.

    Declaration
    public static StructuredTableSchema BuildSchema(StoreTable table)
    Parameters
    Type Name Description
    StoreTable table
    Returns
    Type Description
    StructuredTableSchema

    ToData(StructuredRecord)

    Maps a StructuredRecord back to a GameProgressData.

    Declaration
    public static GameProgressData ToData(StructuredRecord record)
    Parameters
    Type Name Description
    StructuredRecord record
    Returns
    Type Description
    GameProgressData

    ToRecord(GameProgressData)

    Maps a GameProgressData to its StructuredRecord field representation.

    Declaration
    public static StructuredRecord ToRecord(GameProgressData data)
    Parameters
    Type Name Description
    GameProgressData data
    Returns
    Type Description
    StructuredRecord
    In this article
    © 2026 Serenity. All Rights Reserved