DataLireCoder swift package
This commit is contained in:
20
Sources/DLCCommon/Structures/RowCodingKey.swift
Normal file
20
Sources/DLCCommon/Structures/RowCodingKey.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
import Foundation
|
||||
|
||||
public struct RowCodingKey: CodingKey, Equatable {
|
||||
// MARK: - Properties
|
||||
|
||||
public let stringValue: String
|
||||
public let intValue: Int?
|
||||
|
||||
// MARK: - Inits
|
||||
|
||||
public init(stringValue: String) {
|
||||
self.stringValue = stringValue
|
||||
self.intValue = nil
|
||||
}
|
||||
|
||||
public init(intValue: Int) {
|
||||
self.stringValue = "Index \(intValue)"
|
||||
self.intValue = intValue
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user