@@ -9,44 +9,6 @@ public protocol PassDataModel: Model {
99
1010 /// The foreign key to the pass table.
1111 var pass : PassType { get set }
12-
13- /// Encode the pass into JSON.
14- ///
15- /// This method should generate the entire pass JSON.
16- ///
17- /// - Parameter db: The SQL database to query against.
18- ///
19- /// - Returns: An object that conforms to ``PassJSON/Properties``.
20- ///
21- /// > Tip: See the [`Pass`](https://developer.apple.com/documentation/walletpasses/pass) object to understand the keys.
22- func passJSON( on db: any Database ) async throws -> any PassJSON . Properties
23-
24- /// Should return a URL path which points to the template data for the pass.
25- ///
26- /// The path should point to a directory containing all the images and localizations for the generated `.pkpass` archive
27- /// but should *not* contain any of these items:
28- /// - `manifest.json`
29- /// - `pass.json`
30- /// - `personalization.json`
31- /// - `signature`
32- ///
33- /// - Parameter db: The SQL database to query against.
34- ///
35- /// - Returns: A URL path which points to the template data for the pass.
36- func template( on db: any Database ) async throws -> String
37-
38- /// Create the personalization JSON struct.
39- ///
40- /// This method should generate the entire personalization JSON struct.
41- /// If the pass in question requires personalization, you should return a ``PersonalizationJSON``.
42- /// If the pass does not require personalization, you should return `nil`.
43- ///
44- /// The default implementation of this method returns `nil`.
45- ///
46- /// - Parameter db: The SQL database to query against.
47- ///
48- /// - Returns: A ``PersonalizationJSON`` or `nil` if the pass does not require personalization.
49- func personalizationJSON( on db: any Database ) async throws -> PersonalizationJSON ?
5012}
5113
5214extension PassDataModel {
@@ -60,9 +22,3 @@ extension PassDataModel {
6022 return pass
6123 }
6224}
63-
64- extension PassDataModel {
65- public func personalizationJSON( on db: any Database ) async throws -> PersonalizationJSON ? {
66- nil
67- }
68- }
0 commit comments