package org.jeecg.modules.system.app.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 分账管理
 * @Author: jeecg-boot
 * @Date:   2025-07-10
 * @Version: V1.0
 */
@Data
@TableName("nm_separate_accounts")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description="分账管理")
public class SeparateAccounts implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private String id;
	/**关联的商户信息*/
	@Excel(name = "关联的商户信息", width = 15)
    @Schema(description = "关联的商户信息")
    @NotBlank(message = "商户不允许为空")
    private String deptId;
	/**平台分账比例 单位%*/
	@Excel(name = "平台分账比例 单位%", width = 15)
    @Schema(description = "平台分账比例 单位%")
    @DecimalMin(value = "0.00", message = "累计总金额不能小于0")
    private BigDecimal ptSeparateAccounts;
	/**商家分账比例 单位%*/
	@Excel(name = "商家分账比例 单位%", width = 15)
    @Schema(description = "商家分账比例 单位%")
    @DecimalMin(value = "0.00", message = "累计总金额不能小于0")
    private BigDecimal shSeparateAccounts;
    /**商家分账比例 单位%*/
    @Excel(name = "商家分账比例 单位%", width = 15)
    @Schema(description = "商家分账比例 单位%")
    @DecimalMin(value = "0.00", message = "累计总金额不能小于0")
    private BigDecimal mdSeparateAccounts;
	/**分账状态 0-启用 1-停用  默认启用*/
	@Excel(name = "分账状态 0-启用 1-停用  默认启用", width = 15)
    @Schema(description = "分账状态 0-启用 1-停用  默认启用")
    private Integer accountStatus;
	/**创建人*/
    @Schema(description = "创建人")
    private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private Date createTime;
	/**更新人*/
    @Schema(description = "更新人")
    private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    private Date updateTime;
	/**删除标志;删除状态(0-正常,1-已删除)*/
	@Excel(name = "删除标志;删除状态(0-正常,1-已删除)", width = 15)
    @Schema(description = "删除标志;删除状态(0-正常,1-已删除)")
    @TableLogic
    private Integer delFlag;
}
