@@ -17,33 +17,33 @@ import Vapor
1717import Fluent
1818import FluentMySQLDriver
1919
20- // UNCOMMENT-DATABASE to configure database example
21- // // Content conformance will ensure that the object can be encoded and decoded from HTTP messages.
22- // final class Employee: Model, Content {
23- // // Name of the table or collection.
24- // static let schema = "employees"
20+ /// This class provides the model for an Employee
21+ final public class Employee : Model , Content {
22+ // Name of the table or collection.
23+ public static let schema = " employees "
2524
26- // // Unique identifier for this Employee.
27- // @ID(custom: "emp_no", generatedBy: .database)
28- // var id: Int?
25+ / // Unique identifier for this Employee.
26+ @ID ( custom: " emp_no " , generatedBy: . database)
27+ public var id : Int ?
2928
30- // // Additional fields for this Employee.
31- // @Field(key: "first_name")
32- // var firstName: String
29+ /// First name of employee
30+ @Field ( key: " first_name " )
31+ public var firstName : String
3332
34- // @Field(key: "last_name")
35- // var lastName: String
33+ /// Last name of employee
34+ @Field ( key: " last_name " )
35+ public var lastName : String
3636
37- // @Field(key: "gender")
38- // var gender: String
37+ @Field ( key: " gender " )
38+ public var gender : String
3939
40- // @Field(key: "birth_date")
41- // var birthDate: Date
40+ @Field ( key: " birth_date " )
41+ public var birthDate : Date
4242
43- // @Field(key: "hire_date")
44- // var hireDate: Date
43+ @Field ( key: " hire_date " )
44+ public var hireDate : Date
4545
46- // // Creates a new, empty Employee.
47- // init() { }
48- // }
46+ // Creates a new, empty Employee.
47+ public init ( ) { }
48+ }
4949
0 commit comments