{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/movie-planner-ru/json-schema/movie-planner-ru-plan-schema.json",
  "title": "Plan",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/movie-planner-ru-openapi.yaml#/components/schemas/Plan",
  "type": "object",
  "required": [
    "id",
    "plan_type",
    "plan_datetime",
    "title"
  ],
  "properties": {
    "id": {
      "type": "integer"
    },
    "plan_id": {
      "type": "integer",
      "description": "Идентификатор плана, равен id; используется для удаления, не film_id и не kp_id."
    },
    "year": {
      "type": [
        "integer",
        "null"
      ]
    },
    "created_by_user_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Автор плана; поле добавлено к существующему ответу."
    },
    "plan_type": {
      "type": "string",
      "enum": [
        "home",
        "cinema"
      ]
    },
    "plan_datetime": {
      "type": "string",
      "format": "date-time"
    },
    "title": {
      "type": "string"
    },
    "film_id": {
      "type": [
        "integer",
        "null"
      ]
    },
    "kp_id": {
      "type": [
        "integer",
        "null"
      ]
    },
    "cinema_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "cinema_address": {
      "type": [
        "string",
        "null"
      ]
    },
    "online_link": {
      "type": [
        "string",
        "null"
      ]
    },
    "is_series": {
      "type": "boolean"
    }
  }
}