{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/remem-me/json-schema/remem-me-patched-account-request-schema.json",
  "title": "PatchedAccountRequest",
  "description": "Base class for all replicable model serializers.\n\nProvides:\n- Automatic use of ReplicableListSerializer for batch operations\n- Batch FK validation hook via collect_and_validate_foreign_keys()\n- Automatic cleanup of batch validation cache via _clear_batch_validation_cache()\n\nSubclasses can override collect_and_validate_foreign_keys() to\nvalidate foreign keys efficiently in batch operations.\n\nIMPORTANT: Invalid foreign keys are auto-nullified (not rejected) to prevent\nconstraint violations during offline-first replication. This is by design:\nmobile clients may sync data with stale FK references, and auto-nullification\nensures data is accepted and corrected rather than rejected entirely.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/remem-me-openapi.yml#/components/schemas/PatchedAccountRequest",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "modified": {
      "type": "integer",
      "maximum": 9223372036854775807,
      "minimum": -9223372036854775808,
      "format": "int64"
    },
    "modified_by": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 36
    },
    "deleted": {
      "type": "boolean"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "language": {
      "type": "string",
      "minLength": 1,
      "maxLength": 15
    },
    "lang_ref": {
      "type": "string",
      "minLength": 1,
      "title": "Reference language",
      "maxLength": 15
    },
    "review_limit": {
      "type": "integer",
      "maximum": 2147483647,
      "minimum": -2147483648
    },
    "daily_goal": {
      "type": "integer",
      "maximum": 2147483647,
      "minimum": -2147483648
    },
    "review_frequency": {
      "type": "number",
      "format": "double"
    },
    "review_batch": {
      "type": "integer",
      "maximum": 2147483647,
      "minimum": -2147483648
    },
    "inverse_limit": {
      "type": "integer",
      "maximum": 2147483647,
      "minimum": -2147483648
    },
    "order_new": {
      "allOf": [
        {
          "$ref": "#/$defs/OrderNewEnum"
        }
      ],
      "minimum": -2147483648,
      "maximum": 2147483647
    },
    "order_due": {
      "allOf": [
        {
          "$ref": "#/$defs/OrderDueEnum"
        }
      ],
      "minimum": -2147483648,
      "maximum": 2147483647
    },
    "order_known": {
      "allOf": [
        {
          "$ref": "#/$defs/OrderKnownEnum"
        }
      ],
      "minimum": -2147483648,
      "maximum": 2147483647
    },
    "order_all": {
      "allOf": [
        {
          "$ref": "#/$defs/OrderAllEnum"
        }
      ],
      "minimum": -2147483648,
      "maximum": 2147483647
    },
    "reference_included": {
      "type": "boolean"
    },
    "topic_preferred": {
      "type": "boolean"
    },
    "imported_decks": {
      "type": "array",
      "items": {
        "type": "integer",
        "maximum": 9223372036854775807,
        "minimum": -9223372036854775808,
        "format": "int64",
        "title": "Label"
      }
    },
    "default_source": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 250
    },
    "canon": {
      "allOf": [
        {
          "$ref": "#/$defs/CanonEnum"
        }
      ],
      "minimum": -2147483648,
      "maximum": 2147483647
    },
    "font_type": {
      "allOf": [
        {
          "$ref": "#/$defs/FontTypeEnum"
        }
      ],
      "minimum": -2147483648,
      "maximum": 2147483647
    }
  },
  "$defs": {
    "CanonEnum": {
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5
      ],
      "type": "integer",
      "description": "* `0` - Protestant\n* `1` - Lutheran\n* `2` - Roman\n* `3` - Eastern\n* `4` - Oriental\n* `5` - Jewish"
    },
    "FontTypeEnum": {
      "enum": [
        0,
        1,
        2
      ],
      "type": "integer",
      "description": "* `0` - Sans\n* `1` - Serif\n* `2` - Mono"
    },
    "OrderAllEnum": {
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10
      ],
      "type": "integer",
      "description": "* `0` - Alphabet Asc\n* `1` - Canon Asc\n* `2` - Topic Asc\n* `3` - Date Asc\n* `4` - Level Asc\n* `5` - Random\n* `6` - Alphabet Desc\n* `7` - Canon Desc\n* `8` - Topic Desc\n* `9` - Date Desc\n* `10` - Level Desc"
    },
    "OrderDueEnum": {
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10
      ],
      "type": "integer",
      "description": "* `0` - Alphabet Asc\n* `1` - Canon Asc\n* `2` - Topic Asc\n* `3` - Date Asc\n* `4` - Level Asc\n* `5` - Random\n* `6` - Alphabet Desc\n* `7` - Canon Desc\n* `8` - Topic Desc\n* `9` - Date Desc\n* `10` - Level Desc"
    },
    "OrderKnownEnum": {
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10
      ],
      "type": "integer",
      "description": "* `0` - Alphabet Asc\n* `1` - Canon Asc\n* `2` - Topic Asc\n* `3` - Date Asc\n* `4` - Level Asc\n* `5` - Random\n* `6` - Alphabet Desc\n* `7` - Canon Desc\n* `8` - Topic Desc\n* `9` - Date Desc\n* `10` - Level Desc"
    },
    "OrderNewEnum": {
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10
      ],
      "type": "integer",
      "description": "* `0` - Alphabet Asc\n* `1` - Canon Asc\n* `2` - Topic Asc\n* `3` - Date Asc\n* `4` - Level Asc\n* `5` - Random\n* `6` - Alphabet Desc\n* `7` - Canon Desc\n* `8` - Topic Desc\n* `9` - Date Desc\n* `10` - Level Desc"
    }
  }
}