package org.qinan.safetyeval.domain.change.model;

import cn.hutool.extra.spring.SpringUtil;
import com.alibaba.cola.domain.DomainFactory;
import com.alibaba.cola.domain.Entity;
import com.jjb.saas.framework.domain.model.BaseE;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.qinan.safetyeval.domain.change.gateway.QualFilingCommitmentChangeGateway;

import java.time.LocalDateTime;

/**
 * 法定代人承诺书-变更领域模型
 *
 * @Author: ltq
 * @date 2026-07-02 09:38:30
 */
@Data
@Entity
@EqualsAndHashCode(callSuper = true)
public class QualFilingCommitmentChangeE extends BaseE {
    private static final long serialVersionUID = 1L;

    /**
     * 备案变更id
     */
    private Long filingChangeId;
    /**
     * 承诺内容
     */
    private String commitmentContent;
    /**
     * 法定代表人签名图片地址
     */
    private String legalRepSignatureUrl;
    /**
     * 签署日期
     */
    private LocalDateTime signDate;
    /**
     * 法定代表人机构人员id
     */
    private Long legalRepPersonnelId;
    /**
     * 法定代表人姓名
     */
    private String legalRepName;
    /**
     * 环境
     */
    private String env;
    private transient QualFilingCommitmentChangeGateway qualFilingCommitmentChangeGateway;

    public QualFilingCommitmentChangeE() {
        this.qualFilingCommitmentChangeGateway = SpringUtil.getBean(QualFilingCommitmentChangeGateway.class);
    }

    public static QualFilingCommitmentChangeE of() {
        return DomainFactory.create(QualFilingCommitmentChangeE.class);
    }

    public boolean add() {
        return qualFilingCommitmentChangeGateway.add(this);
    }

    public boolean update() {
        return qualFilingCommitmentChangeGateway.update(this);
    }
}
