struct Keys { static let id = "id" static let name = "name" static let age = "age" } static let idType: IdentifierType = .uuid var name: String var age: Int = 0 init(name: String, age: Int ) { self.name = name self.age = age } required init(row: Row) throws { name = try row.get(UserModel.Keys.name) age = try row.get(UserModel.Keys.age) } func makeRow() throws -> Row { var row = Row() try row.set(UserModel.Keys.name, name) try row.set(UserModel.Keys.age, age) return row } }