package fr.titionfire.ffsaf.rest.client.dto;

import io.quarkus.runtime.annotations.RegisterForReflection;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@RegisterForReflection
public class NotificationData {
    private Order order;
    private Integer id;
    private String formSlug;
    private String formType;
    private String organizationSlug;
    private String checkoutIntentId;
    private String oldSlugOrganization; // Pour les changements de nom d'association
    private String newSlugOrganization;
    private String state; // Pour les formulaires
    private List<Item> items;


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @RegisterForReflection
    public static class Order {
        private Integer id;
        private String organizationSlug;
        private String formSlug;
        private String formType;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @RegisterForReflection
    public static class Item {
        private String name;
        private User user;
        private List<CustomField> customFields;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @RegisterForReflection
    public static class User {
        private String firstName;
        private String lastName;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @RegisterForReflection
    public static class CustomField {
        private String name;
        private String answer;
    }
}
