package com.hotwj.platform.regulationManagement.policyRevision.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.hotwj.platform.regulationManagement.policyRevision.domain.HotPolicyRevision;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;


/**
 * 制度修正记录视图对象 hot_policy_revision
 *
 * @author shihongwei
 * @date 2025-12-11
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = HotPolicyRevision.class)
public class HotPolicyRevisionVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ExcelProperty(value = "主键")
    private Long id;

    /**
     * 公司ID
     */
    @ExcelProperty(value = "公司ID")
    private Long companyId;

    /**
     * 制度ID
     */
    @ExcelProperty(value = "制度ID")
    private Long policyId;

    /**
     * 修订版本号(从1递增)
     */
    @ExcelProperty(value = "修订版本号(从1递增)")
    private Long versionNo;

    /**
     * 修订说明
     */
    @ExcelProperty(value = "修订说明")
    private String changeNote;

    /**
     * 内容快照（修正后 富文本）
     */
    @ExcelProperty(value = "内容快照", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "修=正后,富=文本")
    private String content;

    /**
     * 修正前（富文本）
     */
    @ExcelProperty(value = "修正前", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "富=文本")
    private String correction;

    /**
     * 附件快照URL（或OSS地址）
     */
    @ExcelProperty(value = "附件快照URL", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "或=OSS地址")
    private String attachmentUrl;

    /**
     * 来源模板ID
     */
    @ExcelProperty(value = "来源模板ID")
    private Long templateId;

    /**
     * 修订人
     */
    @ExcelProperty(value = "修订人")
    private Long createdBy;

    private String createByName;

    private String policyTitle;

    private String policyType;

    /**
     * 修订时间
     */
    @ExcelProperty(value = "修订时间")
    private Date createdTime;

    /**
     * 0=正常 1=删除
     */
    @ExcelProperty(value = "0=正常 1=删除")
    private Long isDeleted;


}
