UNPKG

@mbc-cqrs-serverless/sequence

Version:

Generate increment sequence with time-rotation

48 lines (47 loc) 1.41 kB
import { RotateByEnum } from '../enums/rotate-by.enum'; import { SequenceParamsDto } from './sequence-param.dto'; export declare class GenerateFormattedSequenceWithProvidedSettingDto { /** * Date for sequence generation (optional). */ date?: Date; /** * Rotation criteria for the sequence (e.g., yearly, fiscal-yearly). */ rotateBy?: RotateByEnum; /** * Tenant code for identifying the organization. */ tenantCode: string; /** * Type code for specific sequence classification. */ typeCode: string; /** * Type code for specific sequence classification. */ params?: SequenceParamsDto; /** * Optional prefix to add before formatted sequence. */ prefix?: string; /** * Optional postfix to add after formatted sequence. */ postfix?: string; /** * Format string defining the structure of the generated sequence. * Example: 'YYMM-SEQ' where parts like YY, MM, and SEQ are replaced accordingly. */ format: string; /** * Optional registration date to influence fiscal year calculation or other logic. * Accepts an ISO 8601 date string. */ registerDate?: string; /** * Optional starting month of the fiscal year. Defaults to 4 (April) if not provided. * Used when rotateBy is set to FISCAL_YEARLY. */ startMonth?: number; }