package com.cool.store.request.license;

import com.cool.store.entity.LicenseTransactDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @Author suzhuhong
 * @Date 2024/10/9 16:01
 * @Version 1.0
 */
@Data
public class FoodLicenseRequest {

    @ApiModelProperty("主键id")
    private Long id;

    private Long shopId;

    @ApiModelProperty("食品经营许可证图片上传")
    private String foodLicenseUrl;

    @ApiModelProperty("经营者")
    private String operator;

    @ApiModelProperty("食品经营许可证上的法人")
    private String foodLicenseLegalPerson;

    @ApiModelProperty("食营经营场所")
    private String businessPremises;

    @ApiModelProperty("主体业态")
    private String mainBusiness;

    @ApiModelProperty("经营项目")
    private String businessProject;

    @ApiModelProperty("许可证编号")
    private String foodLicenseCode;

    @ApiModelProperty("许可证开始时间")
    private Date foodLicenseStartTime;

    @ApiModelProperty("许可证截止时间")
    private Date foodLicenseEndTime;

    @ApiModelProperty("备注")
    private String foodLicenseRemark;

    @ApiModelProperty("0:保存 1：提交到待审核")
    private Integer submitStatus;


    public LicenseTransactDO toLicenseTransactDO(LicenseTransactDO licenseTransactDO) {
        licenseTransactDO.setMainBusiness(this.mainBusiness);
        licenseTransactDO.setOperator(this.operator);
        licenseTransactDO.setFoodLicenseLegalPerson(this.foodLicenseLegalPerson);
        licenseTransactDO.setBusinessProject(this.businessProject);
        licenseTransactDO.setFoodLicenseRemark(this.foodLicenseRemark);
        licenseTransactDO.setShopId(this.shopId);
        licenseTransactDO.setFoodBusinessLicenseCode(this.foodLicenseCode);
        licenseTransactDO.setFoodLicenseAddress(this.businessPremises);
        licenseTransactDO.setFoodBusinessStartTime(this.foodLicenseStartTime);
        licenseTransactDO.setFoodBusinessEndTime(this.foodLicenseEndTime);
        licenseTransactDO.setFoodBusinessLicenseUrl(this.foodLicenseUrl);
        return licenseTransactDO;
    }
}
