mirror of
https://github.com/caoer/CodableFirebase.git
synced 2026-06-17 02:25:00 +08:00
Add enum example to README
This commit is contained in:
@@ -11,6 +11,10 @@ This library helps you to use your custom types that conform to `Codable` protoc
|
||||
|
||||
```swift
|
||||
struct Model: Codable {
|
||||
enum MyEnum: Int, Codable {
|
||||
case one, two, three
|
||||
}
|
||||
|
||||
let stringExample: String
|
||||
let booleanExample: Bool
|
||||
let numberExample: Double
|
||||
@@ -18,6 +22,7 @@ struct Model: Codable {
|
||||
let arrayExample: [String]
|
||||
let nullExample: Int?
|
||||
let objectExample: [String: String]
|
||||
let myEnum: MyEnum
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user