{
  "services": [
    {
      "name": "Orders",
      "description": "Replace with a sentence about the service, or remove this line.",
      "assemblies": ["Contoso.Orders.Domain.dll"],
      "connectionString": "Orders",
      "domain": {
        "streams":     [ { "implements": "Memoria.EventSourcing.Domain.IStreamId" } ],
        "events":      [ { "implements": "Memoria.EventSourcing.Domain.IEvent" } ],
        "aggregates":  [ { "implements": "Memoria.EventSourcing.Domain.IAggregateRoot", "id": { "genericInterface": "Memoria.EventSourcing.Domain.IAggregateId`1" } } ],
        "projections": [ { "implements": "Memoria.EventSourcing.Domain.IProjection", "id": { "genericInterface": "Memoria.EventSourcing.Domain.IProjectionId`1" } } ],
        "naming": {
          "events":      { "attribute": "Memoria.EventSourcing.Domain.EventType", "property": "Name", "version": "Version" },
          "aggregates":  { "attribute": "Memoria.EventSourcing.Domain.AggregateType", "property": "Name", "version": "Version" },
          "projections": { "attribute": "Memoria.EventSourcing.Domain.ProjectionType", "property": "Name", "version": "Version" }
        },
        "fold":       { "methods": ["Apply"], "version": "Version", "applies": "EventTypeFilter" },
        "serializer": { "kind": "newtonsoft" },
        "ids":        { "property": "Id", "claim": "EventPropertyFilter", "keySeparator": ":" }
      },
      "store": {
        "kind": "cosmos",
        "database": "Memoria",
        "events": {
          "container": "Domain", "where": "c.documentType = 'Event'",
          "streamId": "streamId", "sequence": "sequence", "type": "eventType", "payload": "data",
          "written": "createdDate", "writtenBy": "createdBy", "id": "id"
        },
        "snapshots": [
          {
            "container": "Domain", "where": "c.documentType = 'Aggregate'",
            "streamId": "streamId", "id": "id", "type": "aggregateType", "version": "version", "appliedUpTo": "latestEventSequence",
            "payload": "data", "created": "createdDate", "createdBy": "createdBy", "updated": "updatedDate", "updatedBy": "updatedBy"
          },
          {
            "container": "Domain", "where": "c.documentType = 'Projection'", "kind": "projection",
            "streamId": "streamId", "id": "id", "type": "projectionType", "version": "version", "appliedUpTo": "latestEventSequence",
            "payload": "data", "created": "createdDate", "createdBy": "createdBy", "updated": "updatedDate", "updatedBy": "updatedBy"
          }
        ]
      }
    }
  ]
}
