package com.ycwl.basic.model.custom.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FaceData {
    private String category;
    private String name;
    private List<Occurrence> occurrences;
    private Double ratio;

    // Getters and setters
    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Occurrence> getOccurrences() {
        return occurrences;
    }

    public void setOccurrences(List<Occurrence> occurrences) {
        this.occurrences = occurrences;
    }

    public Double getRatio() {
        return ratio;
    }

    public void setRatio(Double ratio) {
        this.ratio = ratio;
    }

    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Occurrence {
        @JsonProperty("faceUrl")
        private String faceUrl;
        
        private Double from;
        private Position position;
        private String scene;
        private Double score;
        private Double timestamp;
        private Double to;

        // Getters and setters
        public String getFaceUrl() {
            return faceUrl;
        }

        public void setFaceUrl(String faceUrl) {
            this.faceUrl = faceUrl;
        }

        public Double getFrom() {
            return from;
        }

        public void setFrom(Double from) {
            this.from = from;
        }

        public Position getPosition() {
            return position;
        }

        public void setPosition(Position position) {
            this.position = position;
        }

        public String getScene() {
            return scene;
        }

        public void setScene(String scene) {
            this.scene = scene;
        }

        public Double getScore() {
            return score;
        }

        public void setScore(Double score) {
            this.score = score;
        }

        public Double getTimestamp() {
            return timestamp;
        }

        public void setTimestamp(Double timestamp) {
            this.timestamp = timestamp;
        }

        public Double getTo() {
            return to;
        }

        public void setTo(Double to) {
            this.to = to;
        }
    }

    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Position {
        @JsonProperty("leftTop")
        private List<Integer> leftTop;
        
        @JsonProperty("rightBottom")
        private List<Integer> rightBottom;

        // Getters and setters
        public List<Integer> getLeftTop() {
            return leftTop;
        }

        public void setLeftTop(List<Integer> leftTop) {
            this.leftTop = leftTop;
        }

        public List<Integer> getRightBottom() {
            return rightBottom;
        }

        public void setRightBottom(List<Integer> rightBottom) {
            this.rightBottom = rightBottom;
        }
    }
}