# PregnancyInfoDTO.kt

    /*
     * The MIT License
     *
     * Original work sponsored and donated by The Danish Health Data Authority (http://www.sundhedsdatastyrelsen.dk)
     *
     * Copyright (C) 2025 The Danish Health Data Authority (http://www.sundhedsdatastyrelsen.dk)
     *
     *
     * Permission is hereby granted, free of charge, to any person obtaining a copy of
     * this software and associated documentation files (the "Software"), to deal in
     * the Software without restriction, including without limitation the rights to
     * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
     * of the Software, and to permit persons to whom the Software is furnished to do
     * so, subject to the following conditions:
     *
     *
     * The above copyright notice and this permission notice shall be included in all
     * copies or substantial portions of the Software.
     *
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     * SOFTWARE.
     */
    package dk.nsp.mingraviditet.core.network.pregnancyInfo.model

    import dk.nsp.mingraviditet.core.network.util.converters.LocalDateSerializer
    import kotlinx.serialization.SerialName
    import kotlinx.serialization.Serializable
    import java.time.LocalDate

    @Serializable
    data class PregnancyInfoDTO(
        val user: UserDTO?,
        val pregnancyInfo: PregnancyInfoDataDTO?,
        val looseDocument: LooseDocumentDTO?,
    )

    @Serializable
    data class LooseDocumentDTO(
        @Serializable(with = LocalDateSerializer::class)
        val effectiveDate: LocalDate,
    )

    @Serializable
    data class UserDTO(
        val userName: String,
    )

    @Serializable
    data class PregnancyInfoDataDTO(
        @Serializable(with = LocalDateSerializer::class)
        val dueDate: LocalDate,
        val weekNumber: Int,
        val week: String,
        val gestationalAge: String,
        val trimester: String,
        val progressInPercent: Int,
        val fetusSize: FetusSizeDTO,
    )

    @Serializable
    enum class FetusSizeDTO {
        @SerialName("size_0_0_to_1_0")
        SIZE_0_0_TO_1_0,

        @SerialName("size_1_0_to_1_5")
        SIZE_1_0_TO_1_5,

        @SerialName("size_1_5_to_2_0")
        SIZE_1_5_TO_2_0,

        @SerialName("size_2_0_to_2_5")
        SIZE_2_0_TO_2_5,

        @SerialName("size_2_5_to_3_0")
        SIZE_2_5_TO_3_0,

        @SerialName("size_3_0_to_3_5")
        SIZE_3_0_TO_3_5,

        @SerialName("size_3_5_to_4_0")
        SIZE_3_5_TO_4_0,

        @SerialName("size_4_0_to_4_5")
        SIZE_4_0_TO_4_5,

        @SerialName("size_4_5_to_5_0")
        SIZE_4_5_TO_5_0,

        @SerialName("size_5_0_to_5_5")
        SIZE_5_0_TO_5_5,

        @SerialName("size_5_5_to_6_0")
        SIZE_5_5_TO_6_0,

        @SerialName("size_6_0_to_6_5")
        SIZE_6_0_TO_6_5,

        @SerialName("size_6_5_to_7_0")
        SIZE_6_5_TO_7_0,

        @SerialName("size_7_0_to_7_5")
        SIZE_7_0_TO_7_5,

        @SerialName("size_7_5_to_8_0")
        SIZE_7_5_TO_8_0,

        @SerialName("size_8_0_to_8_5")
        SIZE_8_0_TO_8_5,

        @SerialName("size_8_5_to_9_0")
        SIZE_8_5_TO_9_0,

        @SerialName("size_9_0")
        SIZE_9_0,
    }