feat: Adds some documenation comments
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import Dependencies
|
||||
import Foundation
|
||||
|
||||
/// Represents a vendor branch database model.
|
||||
///
|
||||
/// A vendor branch is who purchase orders can be issued to on behalf an `Employee`.
|
||||
/// They are associated with a particular `Vendor`.
|
||||
public struct VendorBranch: Codable, Equatable, Identifiable, Sendable {
|
||||
public var id: UUID
|
||||
public var name: String
|
||||
@@ -24,6 +28,8 @@ public struct VendorBranch: Codable, Equatable, Identifiable, Sendable {
|
||||
}
|
||||
|
||||
public extension VendorBranch {
|
||||
|
||||
/// Represents the fields required to generate a new vendor branch in the database.
|
||||
struct Create: Codable, Sendable, Equatable {
|
||||
public let name: String
|
||||
public let vendorID: Vendor.ID
|
||||
@@ -34,6 +40,10 @@ public extension VendorBranch {
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents the details of a vendor branch, which includes the parent vendor item.
|
||||
///
|
||||
/// This is used in several of the views / api routes that require information about both the
|
||||
/// vendor branch and it's associated parent vendor item.
|
||||
struct Detail: Codable, Equatable, Identifiable, Sendable {
|
||||
public var id: UUID
|
||||
public var name: String
|
||||
@@ -56,6 +66,7 @@ public extension VendorBranch {
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents the fields that are used to update attributes of a vendor branch in the database.
|
||||
struct Update: Codable, Sendable, Equatable {
|
||||
public let name: String?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user