package com.example.demo.dto;

public class UserDto {
	private Integer id;
	private String username;
	private String email;
	private String displayName;
	private String bio;

	public UserDto() {
	}

	public UserDto(Integer id, String username, String email) {
		this.id = id;
		this.username = username;
		this.email = email;
	}

	public UserDto(Integer id, String username, String email, String displayName, String bio) {
		this.id = id;
		this.username = username;
		this.email = email;
		this.displayName = displayName;
		this.bio = bio;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getEmail() {
		return email;
	}

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

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getBio() {
		return bio;
	}

	public void setBio(String bio) {
		this.bio = bio;
	}

	public String getEffectiveDisplayName() {
		if (displayName != null && !displayName.isBlank()) {
			return displayName;
		}
		return username;
	}
}