package com.xunhong.erp.turbo.infra.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.xunhong.erp.turbo.api.infra.dto.enums.AgreementSceneEnum;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author shenyifei
 */
@Data
@TableName(value = "agreement", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
public class AgreementDO extends BaseDO<AgreementDO> {

	/**
	 * 协议id
	 */
	@TableId(value = "agreement_id", type = IdType.ASSIGN_ID)
	private Long agreementId;

	/**
	 * 使用场景
	 */
	@TableField(value = "scene", typeHandler = JacksonTypeHandler.class)
	private List<AgreementSceneEnum> scene;

	/**
	 * 协议标题
	 */
	@TableField(value = "title")
	private String title;

	/**
	 * 副标题
	 */
	@TableField(value = "sub_title")
	private String subTitle;

	/**
	 * 协议内容
	 */
	@TableField(value = "content")
	private String content;

}

