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

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@TableName("channel")
@EqualsAndHashCode(callSuper = true)
public class ChannelDO extends Model<ChannelDO> {

	/**
	 * 渠道ID
	 */
	@TableId(value = "channel_id", type = IdType.ASSIGN_ID)
	private Long channelId;

	/**
	 * 域名
	 */
	@TableField(value = "domain")
	private String domain;
	/**
	 * Logo
	 */
	@TableField(value = "logo")
	private String logo;
	/**
	 * 标题
	 */
	@TableField(value = "title")
	private String title;
	/**
	 * 副标题
	 */
	@TableField(value = "sub_title")
	private String subTitle;
	/**
	 * 背景图片
	 */
	@TableField(value = "background_image_url")
	private String backgroundImageUrl;
	/**
	 * 技术支持
	 */
	@TableField(value = "technical_support")
	private String technicalSupport;
	/**
	 * 创建时间
	 */
	@TableField(value = "created_at", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NEVER)
	private LocalDateTime createdAt;
	/**
	 * 更新时间
	 */
	@TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime updatedAt;
	/**
	 * 逻辑删除时间
	 */
	@TableLogic(value = "0", delval = "1")
	@TableField(value = "is_delete", fill = FieldFill.INSERT)
	private Integer isDelete;
	/**
	 * 数据版本号(乐观锁)
	 */
	@Version
	@TableField(value = "version", fill = FieldFill.INSERT)
	private Integer version;
}

