package com.example.demo.dto;

import java.util.List;

public class ProfileDto {
	private Integer id;
	private String username;
	private String displayName;
	private String bio;
	private List<RecipeDto> recipes;

	public ProfileDto() {
	}

	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 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 List<RecipeDto> getRecipes() {
		return recipes;
	}

	public void setRecipes(List<RecipeDto> recipes) {
		this.recipes = recipes;
	}

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