{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/car-gene-com/json-schema/car-gene-com-admin-listings-response-schema.json",
  "title": "AdminListingsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/car-gene-com-admin-users-api-openapi.yml#/components/schemas/AdminListingsResponse",
  "properties": {
    "listings": {
      "items": {
        "$ref": "#/$defs/AdminListing"
      },
      "type": "array",
      "title": "Listings"
    }
  },
  "type": "object",
  "required": [
    "listings"
  ],
  "$defs": {
    "AdminListing": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "model": {
          "$ref": "#/$defs/ListingModel"
        },
        "grade": {
          "type": "string",
          "title": "Grade"
        },
        "price_yen": {
          "type": "integer",
          "title": "Price Yen"
        },
        "total_price_yen": {
          "type": "integer",
          "title": "Total Price Yen"
        },
        "first_registration_year": {
          "type": "integer",
          "title": "First Registration Year"
        },
        "first_registration_month": {
          "type": "integer",
          "title": "First Registration Month"
        },
        "mileage_km": {
          "type": "integer",
          "title": "Mileage Km"
        },
        "inspection_year": {
          "type": "integer",
          "title": "Inspection Year"
        },
        "inspection_month": {
          "type": "integer",
          "title": "Inspection Month"
        },
        "repair_history": {
          "type": "boolean",
          "title": "Repair History"
        },
        "transmission": {
          "type": "string",
          "enum": [
            "mt",
            "at",
            "cvt",
            "other"
          ],
          "title": "Transmission"
        },
        "status": {
          "type": "string",
          "enum": [
            "draft",
            "published",
            "sold",
            "hidden"
          ],
          "title": "Status"
        },
        "published_at": {
          "type": "string",
          "format": "date-time",
          "title": "Published At"
        },
        "minor_change_name": {
          "type": "string",
          "title": "Minor Change Name"
        },
        "photo": {
          "$ref": "#/$defs/Photo"
        },
        "photo_count": {
          "type": "integer",
          "title": "Photo Count"
        },
        "shop_id": {
          "type": "string",
          "title": "Shop Id"
        },
        "shop_name": {
          "type": "string",
          "title": "Shop Name"
        },
        "prefecture": {
          "type": "string",
          "title": "Prefecture"
        },
        "city": {
          "type": "string",
          "title": "City"
        }
      },
      "type": "object",
      "required": [
        "id",
        "model",
        "first_registration_year",
        "repair_history",
        "transmission",
        "status",
        "photo_count",
        "shop_id",
        "shop_name"
      ],
      "title": "AdminListing",
      "description": "一覧のカード。写真は先頭の 1 枚"
    },
    "ListingModel": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "chassis_code": {
          "type": "string",
          "title": "Chassis Code"
        },
        "start_year": {
          "type": "integer",
          "title": "Start Year"
        },
        "end_year": {
          "type": "integer",
          "title": "End Year"
        },
        "series_id": {
          "type": "string",
          "title": "Series Id"
        },
        "series_name": {
          "type": "string",
          "title": "Series Name"
        },
        "maker_id": {
          "type": "string",
          "title": "Maker Id"
        },
        "maker_name": {
          "type": "string",
          "title": "Maker Name"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "start_year",
        "series_id",
        "series_name",
        "maker_id",
        "maker_name"
      ],
      "title": "ListingModel",
      "description": "紐づけた世代。画面は `lib/model-metadata.ts` の見出しと同じ綴りで出す"
    },
    "Photo": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "s3key": {
          "type": "string",
          "title": "S3Key"
        },
        "width": {
          "type": "integer",
          "title": "Width"
        },
        "height": {
          "type": "integer",
          "title": "Height"
        }
      },
      "type": "object",
      "required": [
        "id",
        "s3key",
        "width",
        "height"
      ],
      "title": "Photo"
    }
  }
}