> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bbrands.io/llms.txt
> Use this file to discover all available pages before exploring further.

# BillingCycle

> The schema definition for the BillingCycle resource.

export const ParamField = ({default: defaultValue, deprecated = false, children, name, required = false, rules, type, unique = false, visibility = 'public'}) => <div className="pt-2.5 pb-5 my-2.5 border-gray-50 dark:border-gray-800/50 border-b">
    <div className="flex font-mono text-sm group/param-head param-head">
      <div className="flex-1 flex content-start py-0.5 mr-5">
        <div className="flex items-center flex-wrap gap-2">
          <div className="absolute h-0 w-0">
            <a href="#param-commercial-activity" className="-ml-10 flex items-center opacity-0 border-0 group-hover/param-head:opacity-100 py-2 [.expandable-content_&]:-ml-[2.1rem]" aria-label="Navigate to header">
              <div className="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20">
                <svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512">
                  <path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path>
                </svg>
              </div>
            </a>
          </div>
          <div className="font-semibold text-primary dark:text-primary-light cursor-pointer">{name}</div>
          <div className="flex items-center space-x-2 text-xs font-medium">
            {type && <span className="px-2 py-0.5 rounded-md bg-gray-100/50 dark:bg-white/5 text-gray-600 dark:text-gray-200 font-medium">
                {type}
              </span>}
            {defaultValue && <span className="px-2 py-0.5 rounded-md bg-gray-100/50 dark:bg-white/5 text-gray-600 dark:text-gray-200 font-medium">
                <span className="text-gray-400 dark:text-gray-500">default:</span>"{defaultValue}"
              </span>}
            {visibility && <span className="px-2 py-0.5 rounded-md bg-gray-100/50 dark:bg-white/5 text-blue-600 dark:text-blue-300 font-medium">
                {visibility === 'private' ? 'private' : 'public'}
              </span>}
            {unique && <span className="px-2 py-0.5 rounded-md bg-gray-100/50 dark:bg-white/5 text-blue-600 dark:text-blue-300 font-medium">
                unique
              </span>}
            {required && <span className="px-2 py-0.5 rounded-md bg-red-100/50 dark:bg-red-400/10 text-red-600 dark:text-red-300 font-medium">
                required
              </span>}
            {deprecated && <span className="px-2 py-0.5 rounded-md bg-amber-100/50 dark:bg-amber-400/10 text-amber-600 dark:text-amber-300 font-medium">
                deprecated
              </span>}
          </div>
        </div>
      </div>
    </div>
    {children && <div className="mt-4 prose-sm prose-gray dark:prose-invert [&_.prose>p:first-child]:mt-0 [&_.prose>p:last-child]:mb-0">
        {children}
      </div>}
    {rules && <div className="mt-2 prose-sm prose-gray dark:prose-invert [&_.prose>p:first-child]:mt-0 [&_.prose>p:last-child]:mb-0">
        <b>Rules</b>: <span>{rules}</span>
      </div>}
  </div>;

## Primary key

<ParamField default={'Random UUID'} name={'document_id'} required={true} type={'uuid'} visibility={'public'}>
  The unique identifier for the billing cycle record.
</ParamField>

## Specific attributes

<ParamField name={'description'} type={'varchar'} visibility={'public'}>
  A description of the billing cycle.
</ParamField>

<ParamField default={'0'} name={'discount'} required={true} rules={'Precision: 16, Scale: 4'} type={'numeric'} visibility={'public'}>
  The discount associated with this billing cycle.
</ParamField>

<ParamField name={'internal'} required={true} rules={'Max length: 50 characters'} type={'varchar'} visibility={'public'}>
  The internal identifier for the billing cycle.
</ParamField>

<ParamField default={'0'} name={'months'} required={true} rules={'Precision: 5, Scale: 0'} type={'numeric'} visibility={'public'}>
  The number of months in this billing cycle.
</ParamField>

<ParamField name={'name'} required={true} rules={'Max length: 100 characters'} type={'varchar'} visibility={'public'}>
  The name of the billing cycle.
</ParamField>

## Foreign keys

<ParamField name={'business_unit'} required={true} type={'uuid'} visibility={'public'}>
  The unique identifier of the associated business unit. [Ref: BusinessUnit Schema](/schemas/product/business-unit)
</ParamField>

## Tracking attributes

<ParamField name={'created_at'} required={true} rules={'Precision: 6, with timezone'} type={'timestamp'} visibility={'public'}>
  The timestamp when the billing cycle record was created.
</ParamField>

<ParamField name={'deleted_at'} rules={'Precision: 6, with timezone'} type={'timestamp'} visibility={'public'}>
  The timestamp when the billing cycle record was deleted, if applicable.
</ParamField>

<ParamField default={'true'} name={'is_actived'} required={true} type={'boolean'} visibility={'public'}>
  Indicates whether the billing cycle record is active.
</ParamField>

<ParamField default={'false'} name={'is_deleted'} required={true} type={'boolean'} visibility={'public'}>
  Indicates whether the billing cycle record has been deleted.
</ParamField>

<ParamField name={'updated_at'} rules={'Precision: 6, with timezone'} type={'timestamp'} visibility={'public'}>
  The timestamp when the billing cycle record was last updated.
</ParamField>
