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.common.SettingValue;
import com.xunhong.erp.turbo.api.infra.dto.enums.SettingKeyEnum;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

	/**
	 * 门店id
	 */
	@TableId(value = "setting_id", type = IdType.ASSIGN_ID)
	private Long settingId;

	/**
	 * 系统设置项Key
	 */
	@TableField(value = "setting_key")
	private SettingKeyEnum settingKey;

	/**
	 * 系统设置项内容
	 */
	@TableField(value = "setting_value", typeHandler = JacksonTypeHandler.class)
	private SettingValue settingValue;
}

