DataLireCoder swift package
This commit is contained in:
parent
2cca986016
commit
5aec6ea578
60 changed files with 7144 additions and 0 deletions
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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue