Logo GenPRES

Dto Module

Holds the Dto of a department, with a name field for each kind of department, and converts a department to and from the Dto. Returns an error when more than one field is set.

Types

Type Description

Dto

Functions and values

Function or value Description

dto ()

Full Usage: dto ()

Parameters:
    () : unit

Returns: Dto
() : unit
Returns: Dto

fromDto dto

Full Usage: fromDto dto

Parameters:
Returns: Result<Department, ValidationErrors>

Validates a Dto as a department. A name is trimmed, and a name field with a blank name counts as not set. No field set is an unknown department; more than one field set is an error.

dto : Dto
Returns: Result<Department, ValidationErrors>

toDto dep

Full Usage: toDto dep

Parameters:
Returns: Dto

The Dto of a department.

dep : Department
Returns: Dto

Type something to start searching.