package de.avatic.lcc.dto.users;


import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.Length;

import java.util.List;

public class UserDTO {

    @NotNull
    @JsonProperty("firstname")
    @Length(max = 100, min= 1, message = "Firstname must be max 100 characters long")
    private String firstName;

    @NotNull
    @JsonProperty("lastname")
    @Length(max = 100, min= 1, message = "Lastname must be max 100 characters long")
    private String lastName;

    @Email(message = "Mail must be valid")
    @JsonProperty("mail")
    @Length(max = 254, min = 1, message = "Email must be max 254 characters long")
    private String email;

    @NotNull
    @JsonProperty("workday_id")
    @Length(max = 32, message = "Workday ID must be max 32 characters long")
    private String workdayId;

    @NotNull
    @Size(min = 1)
    @JsonProperty("groups")
    private List<@NotBlank String> groups;

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getWorkdayId() {
        return workdayId;
    }

    public void setWorkdayId(String workdayId) {
        this.workdayId = workdayId;
    }

    public List<String> getGroups() {
        return groups;
    }

    public void setGroups(List<String> groups) {
        this.groups = groups;
    }
}
