{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://developer.reits.tech/schemas/contracts/v1/media-asset.v1.schema.json",
  "title": "MediaAsset",
  "type": "object",
  "additionalProperties": false,
  "required": ["assetId", "objectKey", "contentType", "size", "sha256", "status", "storageBackend", "createdAt"],
  "properties": {
    "assetId": { "type": "string", "minLength": 1, "maxLength": 128 },
    "objectKey": { "type": "string", "minLength": 1, "maxLength": 1024 },
    "contentType": { "type": "string", "minLength": 3, "maxLength": 128 },
    "size": { "type": "integer", "minimum": 1 },
    "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
    "status": { "type": "string", "enum": ["pending", "uploading", "uploaded", "scanning", "clean", "quarantined", "deleted"] },
    "storageBackend": { "type": "string", "enum": ["s3", "local"] },
    "createdAt": { "type": "string", "format": "date-time" }
  }
}
