{
  "title": "settings",
  "description": "One settings document per space: meal slots, aisle order, reminder defaults, theme, shopping item history",
  "version": 0,
  "primaryKey": "id",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "maxLength": 36
    },
    "space_id": {
      "type": "string",
      "maxLength": 36
    },
    "created_by": {
      "type": "string",
      "maxLength": 36
    },
    "updated_at": {
      "type": "string",
      "maxLength": 32
    },
    "meal_slots": {
      "type": "array",
      "maxItems": 12,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "shown"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 60
          },
          "shown": {
            "type": "boolean"
          }
        }
      }
    },
    "aisle_order": {
      "type": "array",
      "maxItems": 40,
      "items": {
        "type": "string",
        "maxLength": 60
      }
    },
    "reminder_defaults": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 525600
      }
    },
    "theme": {
      "type": "string",
      "enum": [
        "system",
        "light",
        "dark"
      ],
      "maxLength": 6
    },
    "item_history": {
      "type": "array",
      "maxItems": 1000,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "category"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "category": {
            "type": "string",
            "maxLength": 60
          }
        }
      }
    }
  },
  "required": [
    "id",
    "space_id",
    "created_by",
    "updated_at",
    "meal_slots",
    "aisle_order",
    "reminder_defaults",
    "theme",
    "item_history"
  ]
}
