         case message(String?)
     }
 
-    static var stationsWithoutPhoto: [Station] = []
+    static var lastUpdatedAt: Date?
+
+    private static var _stationsWithoutPhoto: [Station] = []
+    static var stationsWithoutPhoto: [Station] {
+        return _stationsWithoutPhoto
+    }
     static var currentStation: Station?
 
     // SQLite properties

    static func removeAll() throws {
        let db = try openConnection()
        try db.run(table.delete())
    }

    // Fetch all stations
    static func fetchAll() throws {
        let db = try openConnection()

        stationsWithoutPhoto.removeAll()

        for station in try db.prepare(table) {
            let s = Station.from(row: station)
            stationsWithoutPhoto.append(s)
        }
    }

    // Save a station

            expressionLon <- station.lon,
            expressionHasPhoto <- station.hasPhoto
        ))

        if let stationIdToUpdate = _stationsWithoutPhoto.index(where: { $0.id == station.id }) {
            _stationsWithoutPhoto.remove(at: stationIdToUpdate)
            _stationsWithoutPhoto.insert(station, at: stationIdToUpdate)
        }else {
            _stationsWithoutPhoto.append(station)
        }

        lastUpdatedAt = Date()
    }

    static func delete(station: Station) throws {
        let db = try openConnection()

        let s = table.filter(expressionId == station.id)
        try db.run(s.delete())

        if let stationIdToDelete = _stationsWithoutPhoto.index(where: { $0.id == station.id }) {
            _stationsWithoutPhoto.remove(at: stationIdToDelete)
        }

        lastUpdatedAt = Date()
    }

}
