#pragma once#include <Access/Quota.h>#include <chrono>namespaceDB{/// The information about a quota consumption.structQuotaUsageInfo{usingResourceType=Quota::ResourceType;usingResourceAmount=Quota::ResourceAmount;staticconstexprsize_tMAX_RESOURCE_TYPE=Quota::MAX_RESOURCE_TYPE;structInterval{ResourceAmountused[MAX_RESOURCE_TYPE];ResourceAmountmax[MAX_RESOURCE_TYPE];std::chrono::secondsduration=std::chrono::seconds::zero();boolrandomize_interval=false;std::chrono::system_clock::time_pointend_of_interval;Interval();};std::vector<Interval>intervals;UUIDquota_id;Stringquota_name;Stringquota_key;QuotaUsageInfo();};}