{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/animgen-com/json-schema/animgen-com-admin-subscription-grant-out-schema.json",
  "title": "AdminSubscriptionGrantOut",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/animgen-com-admin-api-openapi.yml#/components/schemas/AdminSubscriptionGrantOut",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "userId": {
      "type": "string",
      "format": "uuid",
      "title": "Userid"
    },
    "planCode": {
      "type": "string",
      "enum": [
        "basic",
        "expert",
        "ultra"
      ],
      "title": "Plancode"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "expired",
        "revoked"
      ],
      "title": "Status"
    },
    "startsAt": {
      "type": "string",
      "title": "Startsat"
    },
    "expiresAt": {
      "type": "string",
      "title": "Expiresat"
    },
    "durationDays": {
      "type": "integer",
      "title": "Durationdays"
    },
    "grantCredits": {
      "type": "boolean",
      "title": "Grantcredits"
    },
    "creditsGranted": {
      "type": "integer",
      "title": "Creditsgranted"
    },
    "creditLotId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Creditlotid"
    },
    "grantedByEmail": {
      "type": "string",
      "title": "Grantedbyemail"
    },
    "reason": {
      "type": "string",
      "title": "Reason"
    },
    "note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Note"
    },
    "revokedAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Revokedat"
    },
    "revokedByEmail": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Revokedbyemail"
    },
    "revokeReason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Revokereason"
    },
    "createdAt": {
      "type": "string",
      "title": "Createdat"
    }
  },
  "type": "object",
  "required": [
    "id",
    "userId",
    "planCode",
    "status",
    "startsAt",
    "expiresAt",
    "durationDays",
    "grantCredits",
    "creditsGranted",
    "grantedByEmail",
    "reason",
    "createdAt"
  ]
}