package com.ruoyi.project.business.domain.vo;

import fr.opensagres.xdocreport.document.images.IImageProvider;
import fr.opensagres.xdocreport.template.annotations.FieldMetadata;
import fr.opensagres.xdocreport.template.annotations.ImageMetadata;
import fr.opensagres.xdocreport.template.formatter.NullImageBehaviour;

public class MaterialImageVO {

    private String codeLeft;
    private IImageProvider photoLeft;

    private String codeRight;

    private IImageProvider photoRight;

    public void setPhotoLeft(IImageProvider photoLeft) {
        this.photoLeft = photoLeft;
    }

    public void setPhotoRight(IImageProvider photoRight) {
        this.photoRight = photoRight;
    }

    // as docx cannot support bookmark name, with dot, we force the name of this field to "photo" and we use "photo" as
    // bookmark name which wraps the "template image".
    @FieldMetadata( images = { @ImageMetadata( name = "photoLeft", behaviour = NullImageBehaviour.RemoveImageTemplate) } )
    public IImageProvider getPhotoLeft()
    {
        return photoLeft;
    }

    @FieldMetadata( images = { @ImageMetadata( name = "photoRight", behaviour = NullImageBehaviour.RemoveImageTemplate) } )
    public IImageProvider getPhotoRight()
    {
        return photoRight;
    }

    @FieldMetadata
    public String getCodeLeft() {
        return codeLeft;
    }

    public void setCodeLeft(String codeLeft) {
        this.codeLeft = codeLeft;
    }
    @FieldMetadata
    public String getCodeRight() {
        return codeRight;
    }

    public void setCodeRight(String codeRight) {
        this.codeRight = codeRight;
    }
}
