{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/revyl/json-schema/revyl-org-file-schema.json",
  "title": "OrgFile",
  "description": "Full org file model with database fields.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/revyl-org-files-api-openapi.yml#/components/schemas/OrgFile",
  "properties": {
    "content_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "MIME content type",
      "title": "Content Type"
    },
    "created_at": {
      "description": "Upload timestamp",
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "File description",
      "title": "Description"
    },
    "file_size": {
      "description": "File size in bytes",
      "title": "File Size",
      "type": "integer"
    },
    "filename": {
      "description": "Display name",
      "title": "Filename",
      "type": "string"
    },
    "id": {
      "description": "File ID",
      "format": "uuid",
      "title": "Id",
      "type": "string"
    },
    "org_id": {
      "description": "Organization ID",
      "format": "uuid",
      "title": "Org Id",
      "type": "string"
    },
    "status": {
      "default": "ready",
      "description": "Upload status: 'pending' or 'ready'",
      "title": "Status",
      "type": "string"
    },
    "updated_at": {
      "description": "Last update timestamp",
      "format": "date-time",
      "title": "Updated At",
      "type": "string"
    },
    "user_id": {
      "description": "User ID who uploaded the file",
      "format": "uuid",
      "title": "User Id",
      "type": "string"
    }
  },
  "required": [
    "id",
    "org_id",
    "user_id",
    "filename",
    "file_size",
    "created_at",
    "updated_at"
  ],
  "type": "object"
}