-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support of optional arrays!
- Loading branch information
Showing
7 changed files
with
89 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// NestedStruct.swift | ||
// Unrealm_Example | ||
// | ||
// Created by Artur Mkrtchyan on 3/20/20. | ||
// Copyright © 2020 CocoaPods. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import Unrealm | ||
|
||
struct ParentStruct: Realmable { | ||
struct ChildStruct: Realmable { | ||
enum ChildEnum: Int, RealmableEnum { | ||
case case1 | ||
case case2 | ||
case case3 | ||
} | ||
|
||
var id: String = "" | ||
var name: String = "" | ||
var childEnum: ChildEnum = .case1 | ||
static func primaryKey() -> String? { | ||
return "id" | ||
} | ||
} | ||
|
||
var id: String = "" | ||
var name: String = "" | ||
var child: ChildStruct = ChildStruct() | ||
|
||
static func primaryKey() -> String? { | ||
return "id" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters