feat: Begins views, login is currently not working.

This commit is contained in:
2025-01-06 17:28:43 -05:00
parent 5efed277a1
commit 35ca73e1b4
10 changed files with 109 additions and 15 deletions

View File

@@ -1,6 +1,11 @@
import Fluent
import Vapor
/// The purchase order database model.
///
/// # NOTE: An initial purchase order should be created with an `id` higher than our current PO
/// so that subsequent PO's are generated with higher values than our current system produces.
/// once the first one is set, the rest will auto-increment from there.
final class PurchaseOrder: Model, Content, @unchecked Sendable {
static let schema = "purchase_order"
@@ -80,6 +85,7 @@ final class PurchaseOrder: Model, Content, @unchecked Sendable {
extension PurchaseOrder {
struct Create: Content {
let id: Int?
let workOrder: Int?
let materials: String
let customer: String
@@ -89,7 +95,7 @@ extension PurchaseOrder {
func toModel(createdByID: User.IDValue) -> PurchaseOrder {
.init(
id: nil,
id: id,
workOrder: workOrder,
materials: materials,
customer: customer,