import Foundation

struct DatabaseFile {

    let file: String

    var name: String

    var isDefault: Bool

    var url: URL {
        FileManager.default.documentDirectory.appendingPathComponent(file)
    }
}

extension DatabaseFile: Codable {

}

extension DatabaseFile: Identifiable {

    var id: String { name }
}

extension DatabaseFile: Equatable {

    static func ==(lhs: DatabaseFile, rhs: DatabaseFile) -> Bool {
        lhs.file == rhs.file
    }
}
