import { Controller, Get } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; import { Public } from 'src/core/guards'; import { STATUS } from 'src/core/strings/constants/base.constants'; import { ItemType } from 'src/modules/item-related/item-category/constants'; import { LimitType } from 'src/modules/item-related/item/constants'; import { PaymentMethodType } from 'src/modules/transaction/payment-method/constants'; @ApiTags('configuration - constant') @Controller('v1/constant') @Public(true) export class ConstantController { constructor() {} @Get('master-data-status') async masterDataStatus(): Promise { return [STATUS.ACTIVE, STATUS.DRAFT, STATUS.INACTIVE]; } @Get('category-item-type') async categoryType(): Promise { return Object.values(ItemType); } @Get('item-limit-type') async limitType(): Promise { return Object.values(LimitType); } @Get('payment-type') async paymentMethodType(): Promise { return Object.values(PaymentMethodType); } }