feat: Adds some documentation strings in ManualDCore module.
This commit is contained in:
@@ -2,19 +2,32 @@ import Dependencies
|
||||
import Foundation
|
||||
|
||||
extension User {
|
||||
/// Represents a user's profile. Which contains extra information about a user of the site.
|
||||
public struct Profile: Codable, Equatable, Identifiable, Sendable {
|
||||
|
||||
/// The unique id of the profile
|
||||
public let id: UUID
|
||||
/// The user id the profile is for.
|
||||
public let userID: User.ID
|
||||
/// The user's first name.
|
||||
public let firstName: String
|
||||
/// The user's last name.
|
||||
public let lastName: String
|
||||
/// The user's company name.
|
||||
public let companyName: String
|
||||
/// The user's street address.
|
||||
public let streetAddress: String
|
||||
/// The user's city.
|
||||
public let city: String
|
||||
/// The user's state.
|
||||
public let state: String
|
||||
/// The user's zip code.
|
||||
public let zipCode: String
|
||||
/// An optional theme that the user prefers.
|
||||
public let theme: Theme?
|
||||
/// When the profile was created in the database.
|
||||
public let createdAt: Date
|
||||
/// When the profile was updated in the database.
|
||||
public let updatedAt: Date
|
||||
|
||||
public init(
|
||||
@@ -49,15 +62,25 @@ extension User {
|
||||
|
||||
extension User.Profile {
|
||||
|
||||
/// Represents the data required to create a user profile.
|
||||
public struct Create: Codable, Equatable, Sendable {
|
||||
/// The user id the profile is for.
|
||||
public let userID: User.ID
|
||||
/// The user's first name.
|
||||
public let firstName: String
|
||||
/// The user's last name.
|
||||
public let lastName: String
|
||||
/// The user's company name.
|
||||
public let companyName: String
|
||||
/// The user's street address.
|
||||
public let streetAddress: String
|
||||
/// The user's city.
|
||||
public let city: String
|
||||
/// The user's state.
|
||||
public let state: String
|
||||
/// The user's zip code.
|
||||
public let zipCode: String
|
||||
/// An optional theme that the user prefers.
|
||||
public let theme: Theme?
|
||||
|
||||
public init(
|
||||
@@ -83,14 +106,25 @@ extension User.Profile {
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents the fields that can be updated on a user's profile.
|
||||
///
|
||||
/// Only fields that are supplied get updated.
|
||||
public struct Update: Codable, Equatable, Sendable {
|
||||
/// The user's first name.
|
||||
public let firstName: String?
|
||||
/// The user's last name.
|
||||
public let lastName: String?
|
||||
/// The user's company name.
|
||||
public let companyName: String?
|
||||
/// The user's street address.
|
||||
public let streetAddress: String?
|
||||
/// The user's city.
|
||||
public let city: String?
|
||||
/// The user's state.
|
||||
public let state: String?
|
||||
/// The user's zip code.
|
||||
public let zipCode: String?
|
||||
/// An optional theme that the user prefers.
|
||||
public let theme: Theme?
|
||||
|
||||
public init(
|
||||
|
||||
Reference in New Issue
Block a user