import Foundation



// Removed SwiftData dependency to ensure compatibility across targets
struct GIF: Codable, Identifiable, Equatable {
  let id: UUID
  let localFilePath: String
  let originalURL: String
  let createdAt: Date

  var fileURL: URL? {
    return URL(fileURLWithPath: localFilePath)
  }

  init(localFilePath: String, originalURL: String) {
    self.id = UUID()
    self.localFilePath = localFilePath
    self.originalURL = originalURL
    self.createdAt = Date()
  }
  
  init(localFilePath: String, originalURL: String, id: UUID, createdAt: Date) {
    self.id = id
    self.localFilePath = localFilePath
    self.originalURL = originalURL
    self.createdAt = createdAt
  }

  // For equality comparison
  static func == (lhs: GIF, rhs: GIF) -> Bool {
    return lhs.id == rhs.id
  }
}
