package com.cool.store.request;

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author: WangShuo
 * @Date: 2024/10/09/下午5:19
 * @Version 1.0
 * @注释:
 */
@Data
public class PostAndOrderRequest {

    @NotNull
    private Long shopId;
    @ApiModelProperty(value = "1-pos 2-订货系统，3-信发系统 4-营帐通",hidden = true)
    private Integer type;
    @NotBlank
    @ApiModelProperty("账号")
    private String account;
    @NotBlank
    @ApiModelProperty("密码")
    private String password;
    @ApiModelProperty("备注")
    private String remark;

    public PosAndOrderInfoDO toDO(){
        PosAndOrderInfoDO posAndOrderInfoDO = new PosAndOrderInfoDO();
        posAndOrderInfoDO.setShopId(this.shopId);
        posAndOrderInfoDO.setType(this.type);
        posAndOrderInfoDO.setAccount(this.account);
        posAndOrderInfoDO.setPassword(this.password);
        posAndOrderInfoDO.setRemark(this.remark);
        return posAndOrderInfoDO;
    }
}
