{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://tune.toys/schemas/platform/media-relation.schema.json",
  "title": "SoundRelation",
  "description": "A directional relation between two media items, created by either owner. Symmetric in the UI; a relation to an item the viewer cannot read is omitted.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "fromMediaId": {
      "$ref": "common.schema.json#/$defs/EntityId"
    },
    "toMediaId": {
      "$ref": "common.schema.json#/$defs/EntityId"
    },
    "kind": {
      "$ref": "enums.schema.json#/$defs/RelationKind"
    },
    "note": {
      "type": "string",
      "minLength": 0,
      "maxLength": 200
    },
    "createdBy": {
      "$ref": "common.schema.json#/$defs/EntityId"
    },
    "createdAt": {
      "$ref": "common.schema.json#/$defs/Timestamp"
    }
  },
  "required": [
    "fromMediaId",
    "toMediaId",
    "kind",
    "note",
    "createdBy",
    "createdAt"
  ]
}
