mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-08 06:45:55 +02:00
SwiftUI app (iOS 17+) with zero third-party dependencies: - Passwordless email authentication with Keychain token storage - Workspace selection and multi-workspace support - Issue list grouped by status with search and filtering - Issue detail with inline status/priority/assignee editing - Comments with threaded display and compose - Agent task runs history and real-time execution log streaming - WebSocket integration for live updates
47 lines
1.1 KiB
Swift
47 lines
1.1 KiB
Swift
import Foundation
|
|
|
|
struct Comment: Codable, Identifiable, Sendable {
|
|
let id: String
|
|
let issueId: String
|
|
let authorType: String
|
|
let authorId: String
|
|
let content: String
|
|
let type: String
|
|
let parentId: String?
|
|
let attachments: [Attachment]?
|
|
let createdAt: String
|
|
let updatedAt: String
|
|
|
|
// Joined fields from server
|
|
let authorName: String?
|
|
let authorAvatarURL: String?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case id, content, type, attachments
|
|
case issueId = "issue_id"
|
|
case authorType = "author_type"
|
|
case authorId = "author_id"
|
|
case parentId = "parent_id"
|
|
case createdAt = "created_at"
|
|
case updatedAt = "updated_at"
|
|
case authorName = "author_name"
|
|
case authorAvatarURL = "author_avatar_url"
|
|
}
|
|
|
|
var isFromAgent: Bool {
|
|
authorType == "agent"
|
|
}
|
|
}
|
|
|
|
struct Attachment: Codable, Identifiable, Sendable {
|
|
let id: String
|
|
let filename: String
|
|
let contentType: String?
|
|
let url: String?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case id, filename, url
|
|
case contentType = "content_type"
|
|
}
|
|
}
|