{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://shapes.penny.coop/event/1.0.0/schema.json",
  "title": "Event",
  "description": "An event with a title, dates, location, content and optional cover image.",
  "type": "object",
  "properties": {
    "title": {
      "title": "Title",
      "type": "string",
      "x-penny": {
        "field": "text",
        "input": "text"
      }
    },
    "description": {
      "title": "Description",
      "type": "string",
      "x-penny": {
        "field": "textarea",
        "input": "textarea"
      }
    },
    "content": {
      "title": "Content",
      "$ref": "https://shapes.penny.coop/content-markdown/1.0.0/schema.json",
      "x-penny": {
        "field": "content",
        "storage": "markdown"
      }
    },
    "location": {
      "title": "Location",
      "type": "string",
      "x-penny": {
        "field": "text",
        "input": "text"
      }
    },
    "startDate": {
      "title": "Start Date",
      "type": "string",
      "format": "date",
      "x-penny": {
        "field": "date",
        "input": "date"
      }
    },
    "endDate": {
      "title": "End Date",
      "type": "string",
      "format": "date",
      "x-penny": {
        "field": "date",
        "input": "date"
      }
    },
    "coverImage": {
      "title": "Cover Image",
      "type": "object",
      "properties": {
        "ref": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "ref"
      ],
      "description": "A project-local media reference; the file bytes and access permissions are stored separately.",
      "x-penny": {
        "field": "image"
      }
    }
  },
  "required": [
    "title",
    "startDate"
  ],
  "x-penny": {
    "shape": "event",
    "version": "1.0.0",
    "source": "app/types/event.js",
    "sourceName": "event",
    "kind": "record",
    "plural": "Events",
    "icon": "Calendar",
    "defaultVisibility": "private",
    "publishable": false,
    "fieldOrder": [
      "title",
      "description",
      "content",
      "location",
      "startDate",
      "endDate",
      "coverImage"
    ]
  }
}
