package com.xunmei.core.resumption.vo.appRule;

import cn.hutool.core.bean.BeanUtil;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.xunmei.core.resumption.domain.AppRule;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author jingyuanchao
 * @date 2022/4/29 8:57
 */

@Data
public class AppRuleInfoVo {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty("规范名称")
    private String name;

    @ApiModelProperty("规范类型")
    private String type;

//    private String ruleTypeName;
@JsonSerialize(using = ToStringSerializer.class)
    private Long orgId;

    @ApiModelProperty("受检机构类型")
    private String orgType;

    @ApiModelProperty("状态")
    private Integer status;

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

    public static AppRuleInfoVo of(AppRule rule) {
        AppRuleInfoVo vo = new AppRuleInfoVo();
        BeanUtil.copyProperties(rule, vo);
        return vo;
    }
}
