33 lines
1.0 KiB
Swift
33 lines
1.0 KiB
Swift
import Foundation
|
|
|
|
struct Bug: Identifiable, Equatable, Hashable {
|
|
let id: String
|
|
let title: String
|
|
let description: String?
|
|
let priority: BugPriority
|
|
let status: BugStatus
|
|
/// Raw Feishu status option text (e.g. "验收完毕") — needed to preselect
|
|
/// the editable status picker; `status` alone loses it via enum mapping.
|
|
let statusRaw: String?
|
|
let assignee: String
|
|
let reporter: String?
|
|
let customer: String?
|
|
/// 对应模块 — module tags, joined into a single display string.
|
|
let module: String?
|
|
/// 来源 — where the bug was reported (e.g. 运营发现 / 客户提出).
|
|
let source: String?
|
|
/// 流转状态 — raw workflow status text (e.g. Verify / 已结束).
|
|
let flowStatus: String?
|
|
/// 修复备注 — fix notes.
|
|
let fixNotes: String?
|
|
/// 相关截图 — attached screenshots.
|
|
let screenshots: [BugAttachment]
|
|
let createdAt: Date
|
|
let updatedAt: Date
|
|
let feishuURL: URL?
|
|
|
|
var age: TimeInterval {
|
|
Date().timeIntervalSince(createdAt)
|
|
}
|
|
}
|