Skip to content

Store Current Bot State and Inventory in One Cosmos Container #65

@DakotaCondos

Description

@DakotaCondos

As an application developer,
I want each bot to have one Cosmos DB document containing its current state and inventory,
so that APIs can retrieve bot information from a simple, consistent read model.

Acceptance Criteria

  • Given a bot exists in the simulated bot network
    When its readable representation is stored
    Then the Cosmos DB Bots container contains one document for that bot.

  • Given a bot document is created
    When it is saved to Cosmos DB
    Then it includes bot ID, status, availability, location, power level, temperature values, active order information, queued order count, and inventory.

  • Given a bot has inventory
    When the bot document is queried
    Then the document includes item ID, item name, quantity on hand, quantity reserved, and quantity available for each inventory item.

  • Given an API requests bot data
    When the bot document is returned
    Then the API can read both state and inventory from the same document.

  • Given the Cosmos DB container is configured
    When bot documents are stored
    Then the bot ID is used as the document ID and partition key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for User Story.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions