Add SCUM trade catalog projections

This commit is contained in:
npc0-hue
2026-08-27 16:14:59 +08:00
parent 316efbe780
commit a0e7ae362b
16 changed files with 267 additions and 23 deletions
+3 -2
View File
@@ -303,6 +303,7 @@ type GameClientBridgeQueryProjectionDeclarationBody struct {
FieldMappings map[string]string `json:"fieldMappings,omitempty"`
FixedValues map[string]string `json:"fixedValues,omitempty"`
ObservedAtField string `json:"observedAtField,omitempty"`
MergeExisting bool `json:"mergeExisting,omitempty"`
}
type GameClientBridgeLogProjectionStepDeclarationBody struct {
@@ -1339,7 +1340,7 @@ func gameClientBridgeQueryProjectionsToDomain(values []GameClientBridgeQueryProj
}
out := make([]domain.GameClientBridgeQueryProjectionDeclaration, len(values))
for index, value := range values {
out[index] = domain.GameClientBridgeQueryProjectionDeclaration{Collection: value.Collection, RowPath: value.RowPath, MatchField: value.MatchField, MatchValue: value.MatchValue, UpsertKeys: domain.CopyStringSlice(value.UpsertKeys), FieldMappings: domain.CopyStringMap(value.FieldMappings), FixedValues: domain.CopyStringMap(value.FixedValues), ObservedAtField: value.ObservedAtField}
out[index] = domain.GameClientBridgeQueryProjectionDeclaration{Collection: value.Collection, RowPath: value.RowPath, MatchField: value.MatchField, MatchValue: value.MatchValue, UpsertKeys: domain.CopyStringSlice(value.UpsertKeys), FieldMappings: domain.CopyStringMap(value.FieldMappings), FixedValues: domain.CopyStringMap(value.FixedValues), ObservedAtField: value.ObservedAtField, MergeExisting: value.MergeExisting}
}
return out
}
@@ -1838,7 +1839,7 @@ func gameClientBridgeQueryProjectionsFromDomain(values []domain.GameClientBridge
}
out := make([]GameClientBridgeQueryProjectionDeclarationBody, len(values))
for index, value := range values {
out[index] = GameClientBridgeQueryProjectionDeclarationBody{Collection: value.Collection, RowPath: value.RowPath, MatchField: value.MatchField, MatchValue: value.MatchValue, UpsertKeys: domain.CopyStringSlice(value.UpsertKeys), FieldMappings: domain.CopyStringMap(value.FieldMappings), FixedValues: domain.CopyStringMap(value.FixedValues), ObservedAtField: value.ObservedAtField}
out[index] = GameClientBridgeQueryProjectionDeclarationBody{Collection: value.Collection, RowPath: value.RowPath, MatchField: value.MatchField, MatchValue: value.MatchValue, UpsertKeys: domain.CopyStringSlice(value.UpsertKeys), FieldMappings: domain.CopyStringMap(value.FieldMappings), FixedValues: domain.CopyStringMap(value.FixedValues), ObservedAtField: value.ObservedAtField, MergeExisting: value.MergeExisting}
}
return out
}