Compare commits

..

2 Commits

Author SHA1 Message Date
geonhee-min
293a6d5c59 1.0.17 2025-12-16 15:05:15 +09:00
geonhee-min
b5b765b484 issue #
- Scheduler-type export 변경
2025-12-16 15:05:11 +09:00
11 changed files with 30 additions and 29 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@baekyangdan/core-utils",
"version": "1.0.16",
"version": "1.0.17",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@baekyangdan/core-utils",
"version": "1.0.16",
"version": "1.0.17",
"license": "ISC",
"dependencies": {
"@swc/core": "^1.15.5",

View File

@@ -1,6 +1,6 @@
{
"name": "@baekyangdan/core-utils",
"version": "1.0.16",
"version": "1.0.17",
"description": "Common Repo",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -13,4 +13,4 @@ export * from './scheduler/http/HttpApiUrl';
export * as SchedulerDTO from './scheduler/http/dto';
export * as ScheduleType from './scheduler/type/schedule';
export * as Type from './scheduler/type/schedule';

View File

@@ -1,6 +1,6 @@
import { BaseRequestDTO } from '@BaseRequestDTO';
import { IsArray, IsDateString, IsIn, IsString } from 'class-validator';
import { ScheduleTypeArray } from 'src/scheduler/type/schedule/ScheduleType';
import { TypeArray } from 'src/scheduler/type/schedule/ScheduleType';
export class ScheduleCreateRequestDTO extends BaseRequestDTO {
@IsString()
@@ -12,7 +12,7 @@ export class ScheduleCreateRequestDTO extends BaseRequestDTO {
@IsDateString()
endDate!: string;
@IsIn(ScheduleTypeArray)
@IsIn(TypeArray)
type!: string;
@IsString()

View File

@@ -1,15 +1,16 @@
import type { BaseResponseDTO } from '@BaseResponseDTO';
import type { ScheduleType } from 'src/scheduler/type/schedule/ScheduleType';
import type { Status } from 'src/scheduler/type/schedule/ScheduleStatus';
import type { Type } from 'src/scheduler/type/schedule/ScheduleType';
export type ScheduleDetail = {
id: string;
name: string;
startDate: Date;
endDate: Date;
status: string;
status: Status;
content?: string;
isDeleted: boolean;
type: ScheduleType;
type: Type;
createdAt: string;
owner: string;
style: string;

View File

@@ -1,7 +1,7 @@
import { BaseRequestDTO } from '@BaseRequestDTO';
import { IsArray, IsDateString, IsIn, IsNumberString, IsString, ValidateIf } from 'class-validator';
import { ScheduleStatusArray } from 'src/scheduler/type/schedule/ScheduleStatus';
import { ScheduleTypeArray } from 'src/scheduler/type/schedule/ScheduleType';
import { StatusArray } from 'src/scheduler/type/schedule/ScheduleStatus';
import { TypeArray } from 'src/scheduler/type/schedule/ScheduleType';
export class ScheduleListRequestDTO extends BaseRequestDTO {
@ValidateIf(o => o.date !== undefined)
@@ -22,12 +22,12 @@ export class ScheduleListRequestDTO extends BaseRequestDTO {
@ValidateIf(o => o.typeList !== undefined)
@IsArray()
@IsIn(ScheduleTypeArray, { each: true})
@IsIn(TypeArray, { each: true})
typeList?: string[];
@ValidateIf(o => o.status !== undefined)
@IsString()
@IsIn(ScheduleStatusArray)
@IsIn(StatusArray)
status?: string;
@ValidateIf(o => o.name !== undefined)

View File

@@ -1,15 +1,15 @@
import type { BaseResponseDTO } from '@BaseResponseDTO';
import type { ScheduleStatus } from "src/scheduler/type/schedule/ScheduleStatus";
import type { ScheduleType } from "src/scheduler/type/schedule/ScheduleType";
import type { Status } from "src/scheduler/type/schedule/ScheduleStatus";
import type { Type } from "src/scheduler/type/schedule/ScheduleType";
export type ScheduleList = {
name: string;
id: string;
startDate: Date;
endDate: Date;
type: ScheduleType;
type: Type;
style: string;
status: ScheduleStatus;
status: Status;
}
export type ScheduleListResponseDTO = BaseResponseDTO<ScheduleList>;

View File

@@ -1,4 +1,4 @@
export const ScheduleDay: Record<string, string> = {
export const Day: Record<string, string> = {
1: '일',
2: '월',
3: '화',
@@ -8,6 +8,6 @@ export const ScheduleDay: Record<string, string> = {
7: '토'
} as const;
export const ScheduleDayArray = '1234567'.split('');
export const DayArray = '1234567'.split('');
export const ScheduleDayLabelArray = '일월화수목금토'.split('');
export const DayLabelArray = '일월화수목금토'.split('');

View File

@@ -1,8 +1,8 @@
export type ScheduleStatus = 'yet' | 'completed';
export type Status = 'yet' | 'completed';
export const ScheduleStatusLabel: Record<ScheduleStatus, string> = {
export const StatusLabel: Record<Status, string> = {
'yet': '미완료',
'completed': '완료'
} as const;
export const ScheduleStatusArray = ['yet', 'completed'] as const;
export const StatusArray = ['yet', 'completed'] as const;

View File

@@ -1,6 +1,6 @@
export type ScheduleType = 'once' | 'daily' | 'weekly' | 'monthly' | 'annual';
export type Type = 'once' | 'daily' | 'weekly' | 'monthly' | 'annual';
export const ScheduleTypeLabel: Record<ScheduleType, string> = {
export const TypeLabel: Record<Type, string> = {
'once': '반복없음',
'daily': '매일',
'weekly': '매주',
@@ -8,4 +8,4 @@ export const ScheduleTypeLabel: Record<ScheduleType, string> = {
'annual': '매년'
} as const;
export const ScheduleTypeArray = ['once', 'daily', 'weekly', 'monthly', 'annual'] as const;
export const TypeArray = ['once', 'daily', 'weekly', 'monthly', 'annual'] as const;

View File

@@ -1,3 +1,3 @@
export * as Day from './ScheduleDay';
export * as Status from './ScheduleStatus';
export * as Type from './ScheduleType';
export * from './ScheduleDay';
export * from './ScheduleStatus';
export * from './ScheduleType';