You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

  1. //
  2. // CompartmentLocation.swift
  3. //
  4. //
  5. // Created by Michiel Carman on 1/24/24.
  6. //
  7. import Fluent
  8. import Vapor
  9. final class CompartmentLocation: Model, Content {
  10. static let schema = "compartmentLocation"
  11. @ID(custom: "id", generatedBy: .database) var id: Int?
  12. @Field(key: "name") var name: String?
  13. @Field(key: "description") var description: String?
  14. @Field(key: "code") var code: String?
  15. @Field(key: "sortOrder") var sortorder: Int?
  16. @Field(key: "isActive") var isactive: Bool?
  17. @Timestamp(key: "createDate", on: .create) var createdate: Date?
  18. @Field(key: "createUserId") var createuserid: Int?
  19. @Timestamp(key: "updateDate", on: .update) var updatedate: Date?
  20. @Field(key: "updateUserId") var updateuserid: Int?
  21. init() { }
  22. init(id: Int? = nil, name: String? = nil, description: String? = nil, code: String? = nil, sortorder: Int?, isactive: Bool?, createuserid: Int? = nil, updateuserid: Int? = nil) {
  23. self.id = id
  24. self.name = name
  25. self.description = description
  26. self.code = code
  27. self.sortorder = sortorder
  28. self.isactive = isactive
  29. self.createuserid = createuserid
  30. self.updateuserid = updateuserid
  31. }
  32. }