MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / getTransactionSchema

Function getTransactionSchema

internal/search/search.go:575–608  ·  view source on GitHub ↗

getTransactionSchema returns the schema for the "transactions" collection.

()

Source from the content-addressed store, hash-verified

573
574// getTransactionSchema returns the schema for the "transactions" collection.
575func getTransactionSchema() *api.CollectionSchema {
576 facet := true
577 sortBy := "created_at"
578 enableNested := true
579 sourceId := "balances.balance_id"
580 destinationId := "balances.balance_id"
581 return &api.CollectionSchema{
582 Name: "transactions",
583 Fields: []api.Field{
584 {Name: "precise_amount", Type: "string", Facet: &facet},
585 {Name: "amount", Type: "float", Facet: &facet},
586 {Name: "rate", Type: "float", Facet: &facet},
587 {Name: "precision", Type: "float", Facet: &facet},
588 {Name: "transaction_id", Type: "string", Facet: &facet},
589 {Name: "parent_transaction", Type: "string", Facet: &facet},
590 {Name: "source", Type: "string", Reference: &sourceId, Facet: &facet},
591 {Name: "destination", Type: "string", Reference: &destinationId, Facet: &facet},
592 {Name: "reference", Type: "string", Facet: &facet},
593 {Name: "currency", Type: "string", Facet: &facet},
594 {Name: "description", Type: "string", Facet: &facet},
595 {Name: "status", Type: "string", Facet: &facet},
596 {Name: "hash", Type: "string", Facet: &facet},
597 {Name: "allow_overdraft", Type: "bool", Facet: &facet},
598 {Name: "inflight", Type: "bool", Facet: &facet},
599 {Name: "created_at", Type: "int64", Facet: &facet},
600 {Name: "scheduled_for", Type: "int64", Facet: &facet},
601 {Name: "inflight_expiry_date", Type: "int64", Facet: &facet},
602 {Name: "effective_date", Type: "int64", Facet: &facet},
603 {Name: "meta_data", Type: "object", Facet: &facet, Optional: &enableNested},
604 },
605 DefaultSortingField: &sortBy,
606 EnableNestedFields: &enableNested,
607 }
608}
609
610// getReconciliationSchema returns the schema for the "reconciliations" collection.
611func getReconciliationSchema() *api.CollectionSchema {

Callers 3

initFunction · 0.85

Calls

no outgoing calls