summaryrefslogtreecommitdiff
path: root/types
diff options
context:
space:
mode:
Diffstat (limited to 'types')
-rw-r--r--types/evaluation-form.ts142
1 files changed, 142 insertions, 0 deletions
diff --git a/types/evaluation-form.ts b/types/evaluation-form.ts
new file mode 100644
index 00000000..a57287aa
--- /dev/null
+++ b/types/evaluation-form.ts
@@ -0,0 +1,142 @@
+// types/evaluation-form.ts
+
+export interface AttachmentInfo {
+ id: number
+ originalFileName: string
+ storedFileName: string
+ publicPath: string
+ fileSize: number
+ mimeType?: string
+ fileExtension?: string
+ description?: string
+ uploadedBy: number
+ uploadedByName?: string
+ createdAt: Date
+ updatedAt: Date
+ }
+
+ export interface EvaluationQuestionItem {
+ criteriaId: number
+ category: string
+ category2: string
+ item: string
+ classification: string
+ range: string
+ scoreType: 'fixed' | 'variable'
+ remarks: string | null
+ availableOptions: {
+ detailId: number
+ detail: string
+ score: number
+ orderIndex: number
+ }[]
+
+ // 현재 응답 정보
+ responseId: number | null
+ selectedDetailId: number | null
+ currentScore: number | null
+ currentComment: string | null
+
+ // 📎 첨부파일 정보 추가
+ attachments: AttachmentInfo[]
+ attachmentCount: number
+ attachmentTotalSize: number
+ }
+
+ export interface EvaluationFormData {
+ evaluationInfo: {
+ id: number
+ periodicEvaluationId: number
+ evaluationTargetReviewerId: number
+ isCompleted: boolean
+ departmentCode: string
+ division: string
+ materialType: string
+ vendorName: string
+ vendorCode: string
+ reviewerType: string
+ }
+ questions: EvaluationQuestionItem[]
+
+ // 📎 전체 첨부파일 통계
+ attachmentStats: {
+ totalFiles: number
+ totalSize: number
+ questionsWithAttachments: number
+ filesByCategory: Record<string, number>
+ }
+ }
+
+
+ // types/evaluation-detail.ts
+
+export interface AttachmentDetail {
+ id: number
+ originalFileName: string
+ storedFileName: string
+ publicPath: string
+ fileSize: number
+ mimeType?: string
+ fileExtension?: string
+ description?: string
+ uploadedBy: number
+ uploadedByName?: string
+ createdAt: Date
+}
+
+export interface EvaluationDetailItem {
+ criteriaId: number
+ category: string
+ category2: string
+ item: string
+ classification: string
+ range?: string
+ remarks?: string
+ scoreType: string
+ selectedDetailId?: number | null
+ selectedDetail?: string | null
+ score: number | null
+ comment?: string | null
+
+ // 📎 첨부파일 정보 추가
+ attachments: AttachmentDetail[]
+ attachmentCount: number
+ attachmentTotalSize: number
+}
+
+export interface EvaluationDetailData {
+ reviewerEvaluationId: number
+ reviewerName: string
+ reviewerEmail: string
+ departmentCode: string
+ departmentName: string
+ isCompleted: boolean
+ completedAt?: Date | null
+ reviewerComment?: string | null
+ evaluationItems: EvaluationDetailItem[]
+
+ // 📎 리뷰어별 첨부파일 통계
+ totalAttachments: number
+ totalAttachmentSize: number
+ questionsWithAttachments: number
+}
+
+export interface EvaluationDetailResponse {
+ evaluationInfo: {
+ id: number
+ vendorName: string
+ vendorCode: string
+ evaluationYear: number
+ division: string
+ status: string
+ }
+ reviewerDetails: EvaluationDetailData[]
+
+ // 📎 전체 첨부파일 통계
+ attachmentStats: {
+ totalFiles: number
+ totalSize: number
+ reviewersWithAttachments: number
+ questionsWithAttachments: number
+ }
+} \ No newline at end of file