This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Medhavi.Domain.Material.BillOfMaterials | |
| open System | |
| open Medhavi.Domain.Ids | |
| open Medhavi.Domain | |
| open Medhavi.Domain.Validation | |
| open Medhavi.Common.ResultCE | |
| type BomItem = | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Medhavi.Domain.Calendar | |
| open System | |
| open System.Text.Json.Serialization | |
| open Medhavi.Domain.Ids | |
| [<JsonFSharpConverter>] | |
| type CalendarType = | |
| | ResourceCalendar | |
| | PlantCalendar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Medhavi.Domain.Customer | |
| open System | |
| open Medhavi.Domain.Ids | |
| open Medhavi.Domain | |
| open Medhavi.Domain.Validation | |
| open Medhavi.Common.ResultCE | |
| type Customer = | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Medhavi.Domain.Validation | |
| open System | |
| open Medhavi.Domain | |
| /// Reusable validation helpers for command/input checks | |
| let required (field: string) (value: string) = | |
| if String.IsNullOrWhiteSpace value then | |
| Error(DomainError.Validation(DomainErrorCodes.ValidationFailed, $"{field} is required", Map.empty)) | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Orders.Service | |
| open Orders.Domain | |
| open Akka.Actor | |
| type OrderCommand = | |
| | CreateOrder of customerId: string * orderId: string | |
| | UpdateOrder of order: Order * status: OrderStatus | |
| | CancelOrder of order: Order | |
| | ConfirmOrder of id: OrderId |