package marketing.heyday.hartmann.fotodocumentation.rest.vo;

import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import marketing.heyday.hartmann.fotodocumentation.core.model.Picture;

/**
 * 
 * <p>Copyright: Copyright (c) 2024</p>
 * <p>Company: heyday Marketing GmbH</p>
 * @author <a href="mailto:p.verboom@heyday.marketing">Patrick Verboom</a>
 * @version 1.0
 * 
 * created: 22 Jan 2026
 */

@Schema(name = "Picture")
public record PictureValue(Long id, String comment, String category, String image, Date pictureDate, String username) {

	public static PictureValue builder(Picture picture) {
		if (picture == null) {
			return null;
		}
		return new PictureValue(picture.getPictureId(), picture.getComment(), picture.getCategory(), picture.getImage(), picture.getPictureDate(), picture.getUsername());
	}
}