package com.dk.mdm.model.query.sale;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dk.common.infrastructure.annotaiton.ExportTitle;
import com.dk.common.infrastructure.handler.UuidTypeHandler;
import com.dk.common.model.pojo.PageInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 *  多业务归属
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExportTitle("多业务归属")
@TableName(value = "t_psi_multi_owner", schema =  "dkic_b", autoResultMap = true)
@ApiModel(value="实体类：多业务归属", description="表名：t_psi_multi_owner")
public class MultiOwnerQuery extends PageInfo<MultiOwnerQuery> implements Serializable {

    /*
     * 数据库字段
     */

    /**
     * 多业务ID
     */
//    @TableId(value = "multi_id", type = IdType.AUTO)
    @ApiModelProperty(value = "多业务ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String multiId;


    /**
     * 订单Id
     */
    @Excel(name = "订单Id")
    @ApiModelProperty(value = "订单Id")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String orderId;


    /**
     * 归属类型 (【系统字典】)
     */
    @Excel(name = "归属类型 (【系统字典】)")
    @ApiModelProperty(value = "归属类型 (【系统字典】)")
    private String ownerType;


    /**
     * 归属ID
     */
    @Excel(name = "归属ID")
    @ApiModelProperty(value = "归属ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String ownerId;


    /**
     * 分配比例
     */
    @Excel(name = "分配比例")
    @ApiModelProperty(value = "分配比例")
    private BigDecimal allocationRatio;


    /**
     * 有效标识 (1：正常 0：停用)
     */
    @Excel(name = "有效标识 (1：正常 0：停用)")
    @ApiModelProperty(value = "有效标识 (1：正常 0：停用)")
    private Boolean flgValid;


    /**
     * 企业ID
     */
    @TableField(fill = FieldFill.INSERT)
    @Excel(name = "企业ID")
    @ApiModelProperty(value = "企业ID")
    private Integer cpId;


    /*
     * 相关属性
     * @TableField(exist = false)
     */

    /*
     * 关联属性 + 查询条件
     * @TableField(exist = false)
     */
    private List<String> ownerTypes;

    private static final long serialVersionUID = 1L;

}
