import Foundation

public enum SearchMode: String, Sendable, CaseIterable {
    case text, vector, hybrid
}

public struct DocumentListQuery: Sendable {
    public var page: Int = 1
    public var pageSize: Int = 20
    public var domain: String?
    public var subGroup: String?
    public var source: String?
    public var format: String?
    public var reviewStatus: String?
    public var category: String?
    public init() {}
}

public struct MemoListQuery: Sendable {
    public var page: Int = 1
    public var pageSize: Int = 20
    public var pinned: Bool?
    public var archived: Bool?
    public init() {}
}

public struct DocumentUpdate: Codable, Sendable {
    public var title: String?
    public var userNote: String?
    public var pinned: Bool?
    public var reviewStatus: String?
    public init(title: String? = nil, userNote: String? = nil, pinned: Bool? = nil, reviewStatus: String? = nil) {
        self.title = title; self.userNote = userNote; self.pinned = pinned; self.reviewStatus = reviewStatus
    }
    enum CodingKeys: String, CodingKey {
        case title, pinned
        case userNote = "user_note"
        case reviewStatus = "review_status"
    }
}

public struct MemoCreate: Codable, Sendable {
    public var content: String
    public var title: String?
    public var askIncludable: Bool?
    public var sourceChannel: String?
    public init(content: String, title: String? = nil, askIncludable: Bool? = nil, sourceChannel: String? = nil) {
        self.content = content; self.title = title; self.askIncludable = askIncludable; self.sourceChannel = sourceChannel
    }
    enum CodingKeys: String, CodingKey {
        case content, title
        case askIncludable = "ask_includable"
        case sourceChannel = "source_channel"
    }
}

public struct MemoUpdate: Codable, Sendable {
    public var content: String
    public var title: String?
    public init(content: String, title: String? = nil) { self.content = content; self.title = title }
}
