{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ingest.profit-base.online/exchange/v1/schemas/stock-lot.schema.json",
  "title": "Stock lot",
  "description": "The member's stock, personal and shared, of one material at one location, quality and stolen state, summed across org-unit pools. It has no org unit and no row id.",
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "description": "Opaque identifier issued by the Basetool. Clients store and echo it, never parse it."
    },
    "material": {
      "$ref": "item-ref.schema.json"
    },
    "materialKind": {
      "$ref": "material-kind.schema.json"
    },
    "location": {
      "$ref": "location-ref.schema.json"
    },
    "quality": {
      "$ref": "quality.schema.json"
    },
    "stolen": {
      "type": "boolean"
    },
    "quantity": {
      "$ref": "quantity.schema.json"
    },
    "extensions": {
      "$ref": "extensions.schema.json"
    }
  },
  "required": [
    "key",
    "material",
    "location",
    "quality",
    "stolen",
    "quantity"
  ]
}
