| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- // ./constants/forum.ts
- // 반응 구분
- export const Reaction = {
- Like: 1, // 좋아요
- Dislike: 2 // 싫어요
- };
- // 신고 유형
- export const ReportType = {
- None: 0,
- Abuse: 1, // 욕설
- Obscene: 2, // 음란
- Illegal: 3, // 불법
- Impersonation: 4, // 신분 사칭
- CashTrade: 5, // 현금거래유도
- SpamAd: 6, // 스팸/광고
- Flood: 7, // 도배
- PersonalLeak: 8, // 개인정보노출
- Other: 9 // 기타
- };
- // 신고 상태
- export const ReportStatus = {
- Received: 0, // 접수
- Processing: 1, // 처리 중
- Completed: 2 // 조치 완료
- };
- export type Reaction = typeof Reaction[keyof typeof Reaction];
- export type ReportType = typeof ReportType[keyof typeof ReportType];
- export type ReportStatus = typeof ReportStatus[keyof typeof ReportStatus];
- export const ReportTypeLabels: Record<ReportType, string> = {
- [ReportType.None]: '신고 유형을 선택하세요.',
- [ReportType.Abuse]: '욕설',
- [ReportType.Obscene]: '음란',
- [ReportType.Illegal]: '불법',
- [ReportType.Impersonation]: '신분 사칭',
- [ReportType.CashTrade]: '현금거래 유도',
- [ReportType.SpamAd]: '스팸/광고',
- [ReportType.Flood]: '도배',
- [ReportType.PersonalLeak]: '개인정보 노출',
- [ReportType.Other]: '기타'
- };
- // 게시판 종류
- export const BoardLayout = {
- Default: 0, // 일반
- Media: 1, // 사진/동영상
- QnA: 2 // 질문과 답변 (1:1 게시판)
- } as const;
- export type BoardLayout = typeof BoardLayout[keyof typeof BoardLayout];
- // 게시판 정렬
- export const BoardSort = {
- CreatedAt: 0, // 날짜순
- Views: 1, // 조회순
- Comments: 2, // 댓글순
- Likes: 3 // 공감순
- } as const;
- export type BoardSort = typeof BoardSort[keyof typeof BoardSort];
- // 게시글 검색 구분 값
- export const enum PostSearchType {
- Subject = 0, // 제목
- Content = 1, // 댓글
- Author = 2, // 작성자
- Comment = 3 // 댓글
- }
- // 게시글 설정 값
- export const PostConst = {
- MaxAllowedSubjectLength: 120, // 최대 제목 길이
- MaxAllowedContentLength: 5000, // 최대 본문 길이
- MaxAllowedTags: 10, // 최대 태그 입력 제한 수
- MaxAllowedImages: 50, // 최대 이미지 입력 제한 수
- MaxAllowedImageSize: 51200, // 최대 이미지 용량(KB)
- MaxAllowedMedias: 20, // 최대 미디어 입력 제한 수
- MaxAllowedFiles: 10, // 최대 파일 입력 제한 수
- MaxAllowedFileSize: 204800, // 최대 파일 용량(KB)
- } as const;
- // 댓글 설정 값들
- export const CommentConst = {
- // 목록
- DefaultPerPage: 10, // 기본 출력 게시글 수
- MaxPerPage: 50, // 최대 출력 게시글 수
- // 작성 시
- MaxAllowedContentLength: 10000, // 최대 댓글 길이
- MaxAllowedImages: 10, // 최대 이미지 입력 제한 수
- MaxAllowedImageSize: 51200, // 최대 이미지 용량(KB)
- AllowedImageExtensions: ["jpg", "jpeg", "gif", "png"], // 허용 이미지 확장자
- MaxAllowedMedias: 20, // 최대 미디어 입력 제한 수
- MaxAllowedFiles: 5, // 최대 파일 입력 제한 수
- MaxAllowedFileSize: 204800, // 최대 파일 용량(KB)
- // 정렬 조건
- Sort: {
- CreatedAt: 0, // 최신순
- Score: 1 // 인기순
- } as const,
- SortLabels: {
- 0: "최신순",
- 1: "인기순"
- } as const,
- // 상태
- Status: {
- Normal: 0, // 정상
- Hidden: 1, // 나만보기
- DeletedByOwner: 2, // 본인 삭제
- RemovedByAdmin: 3, // 운영자 삭제
- Pending: 4 // 보류
- } as const,
- StatusLabels: {
- 0: "최신순",
- 1: "나만보기",
- 2: "본인 삭제",
- 3: "운영자 삭제",
- 4: "보류"
- } as const,
- };
- export type CommentSort = typeof CommentConst.Sort[keyof typeof CommentConst.Sort];
- export type CommentStatus = typeof CommentConst.Status[keyof typeof CommentConst.Status];
|