From 4508c71ff9e20579a597519fc40f2d0752dd2251 Mon Sep 17 00:00:00 2001 From: Benoit Pereira da Silva Date: Thu, 28 Dec 2017 18:43:10 +0100 Subject: [PATCH] Added Foundation Import --- BartlebysCore.flexions/App/templates/models/model.swift.php | 3 ++- .../App/templates/models/model.swift.template.php | 1 + Sources/BartlebyCore/ManagedModel.swift | 2 ++ Sources/BartlebyCore/Metrics.swift | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/BartlebysCore.flexions/App/templates/models/model.swift.php b/BartlebysCore.flexions/App/templates/models/model.swift.php index 63b50af..7bbe090 100644 --- a/BartlebysCore.flexions/App/templates/models/model.swift.php +++ b/BartlebysCore.flexions/App/templates/models/model.swift.php @@ -136,7 +136,8 @@ function _propertyValueString(PropertyRepresentation $property){ } if ($isBartlebysCore) { - $imports = ""; + $imports = " +import Foundation"; }else{ $imports = " import Foundation diff --git a/BartlebysCore.flexions/App/templates/models/model.swift.template.php b/BartlebysCore.flexions/App/templates/models/model.swift.template.php index 74a8607..48df93d 100644 --- a/BartlebysCore.flexions/App/templates/models/model.swift.template.php +++ b/BartlebysCore.flexions/App/templates/models/model.swift.template.php @@ -2,6 +2,7 @@ + // MARK: description?> open class name)?>:{ diff --git a/Sources/BartlebyCore/ManagedModel.swift b/Sources/BartlebyCore/ManagedModel.swift index 280ddcc..ba04ff7 100644 --- a/Sources/BartlebyCore/ManagedModel.swift +++ b/Sources/BartlebyCore/ManagedModel.swift @@ -8,6 +8,8 @@ // Copyright (c) 2016 https://bartlebys.org All rights reserved. // +import Foundation + // MARK: Bartleby's Core base Managed Entity is Codable and Collectible but not Tolerent (CollectionOf requires the collected type to be tolerent) open class ManagedModel:Model{ diff --git a/Sources/BartlebyCore/Metrics.swift b/Sources/BartlebyCore/Metrics.swift index a21fbcc..330b2f9 100644 --- a/Sources/BartlebyCore/Metrics.swift +++ b/Sources/BartlebyCore/Metrics.swift @@ -8,6 +8,8 @@ // Copyright (c) 2016 https://bartlebys.org All rights reserved. // +import Foundation + // MARK: Bartleby's Core: a value object used to record metrics open class Metrics:ManagedModel{