138 lines
2.8 KiB
TypeScript
138 lines
2.8 KiB
TypeScript
|
|
import { UserInfoViewModel } from "../admin/models"
|
|||
|
|
|
|||
|
|
export interface IntranetDashboardDto {
|
|||
|
|
birthdays: UserInfoViewModel[]
|
|||
|
|
documents: DocumentDto[]
|
|||
|
|
announcements: AnnouncementDto[]
|
|||
|
|
surveys: SurveyDto[]
|
|||
|
|
socialPosts: SocialPostDto[]
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Doküman (FileItemDto ile uyumlu)
|
|||
|
|
export interface DocumentDto {
|
|||
|
|
id: string
|
|||
|
|
name: string
|
|||
|
|
type: string // "file" or "folder"
|
|||
|
|
size: number
|
|||
|
|
extension: string
|
|||
|
|
mimeType: string
|
|||
|
|
createdAt: Date
|
|||
|
|
modifiedAt: Date
|
|||
|
|
path: string
|
|||
|
|
parentId: string
|
|||
|
|
isReadOnly: boolean
|
|||
|
|
childCount: number
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Duyuru
|
|||
|
|
export interface AnnouncementDto {
|
|||
|
|
id: string
|
|||
|
|
title: string
|
|||
|
|
excerpt: string
|
|||
|
|
content: string
|
|||
|
|
imageUrl?: string
|
|||
|
|
category: string
|
|||
|
|
userId: string
|
|||
|
|
user: UserInfoViewModel
|
|||
|
|
publishDate: Date
|
|||
|
|
expiryDate?: Date
|
|||
|
|
isPinned: boolean
|
|||
|
|
viewCount: number
|
|||
|
|
departments?: string[]
|
|||
|
|
attachments?: { name: string; url: string; size: string }[]
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Anket Cevap
|
|||
|
|
export interface SurveyAnswerDto {
|
|||
|
|
questionId: string
|
|||
|
|
questionType: 'rating' | 'multiple-choice' | 'text' | 'textarea' | 'yes-no'
|
|||
|
|
value: string | number | string[]
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Anket Cevabı
|
|||
|
|
export interface SurveyResponseDto {
|
|||
|
|
id: string
|
|||
|
|
surveyId: string
|
|||
|
|
respondentId?: string // Anonymous ise null
|
|||
|
|
submissionTime: Date
|
|||
|
|
answers: SurveyAnswerDto[]
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Anket Sorusu Seçeneği
|
|||
|
|
export interface SurveyQuestionOptionDto {
|
|||
|
|
id: string
|
|||
|
|
text: string
|
|||
|
|
order: number
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Anket Sorusu
|
|||
|
|
export interface SurveyQuestionDto {
|
|||
|
|
id: string
|
|||
|
|
surveyId: string
|
|||
|
|
questionText: string
|
|||
|
|
type: 'rating' | 'multiple-choice' | 'text' | 'textarea' | 'yes-no'
|
|||
|
|
order: number
|
|||
|
|
isRequired: boolean
|
|||
|
|
options?: SurveyQuestionOptionDto[]
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Anket
|
|||
|
|
export interface SurveyDto {
|
|||
|
|
id: string
|
|||
|
|
title: string
|
|||
|
|
description: string
|
|||
|
|
creatorId: UserInfoViewModel
|
|||
|
|
creationTime: Date
|
|||
|
|
deadline: Date
|
|||
|
|
questions: SurveyQuestionDto[]
|
|||
|
|
responses: number
|
|||
|
|
targetAudience: string[]
|
|||
|
|
status: 'draft' | 'active' | 'closed'
|
|||
|
|
isAnonymous: boolean
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Sosyal Duvar - Comment Interface
|
|||
|
|
export interface SocialCommentDto {
|
|||
|
|
id: string
|
|||
|
|
creator: UserInfoViewModel
|
|||
|
|
content: string
|
|||
|
|
creationTime: Date
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
export interface SocialPollOptionDto {
|
|||
|
|
id: string
|
|||
|
|
text: string
|
|||
|
|
votes: number
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Sosyal Duvar - Social Media Interface
|
|||
|
|
export interface SocialMediaDto {
|
|||
|
|
id?: string
|
|||
|
|
type: 'image' | 'video' | 'poll'
|
|||
|
|
|
|||
|
|
// Ortak alanlar
|
|||
|
|
urls?: string[]
|
|||
|
|
|
|||
|
|
// Anket (poll) ile ilgili alanlar doğrudan burada
|
|||
|
|
pollQuestion?: string
|
|||
|
|
pollOptions?: SocialPollOptionDto[]
|
|||
|
|
pollTotalVotes?: number
|
|||
|
|
pollEndsAt?: Date
|
|||
|
|
pollUserVoteId?: string
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Sosyal Duvar - Ana Interface
|
|||
|
|
export interface SocialPostDto {
|
|||
|
|
id: string
|
|||
|
|
user: UserInfoViewModel
|
|||
|
|
content: string
|
|||
|
|
locationJson?: string
|
|||
|
|
media?: SocialMediaDto
|
|||
|
|
likeCount: number
|
|||
|
|
isLiked: boolean
|
|||
|
|
likeUsers: UserInfoViewModel[]
|
|||
|
|
comments: SocialCommentDto[]
|
|||
|
|
isOwnPost: boolean
|
|||
|
|
creationTime: Date
|
|||
|
|
}
|