package com.cyksj.model.views;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.DbIgnore;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author chan
 * @date 2022/12/13 2:54 PM
 */
@Getter
@Setter
@SearchBean(tables = "channel_popularize cp " +
        " LEFT JOIN channel c on c.id = cp.channel_id "
        ,where = ":condition:"
        ,groupBy = "cp.id,cp.name,cp.url,cp.modality,cp.pay_method,cp.created_time,cp.update_time"
)
public class ChannelPopularizeView {

    @DbField("cp.id")
    private Long id;

    /**
     * 渠道id
     */
    @DbField("cp.channel_id")
    private Long channelId;

    /**
     * 渠道名称
     */
    @DbField("c.name")
    private String channelName;

    @DbField("c.creator")
    private String creator;

    @DbField("cp.creator")
    private String popularizeCreator;

    /**
     * 链接名称
     */
    @DbField("cp.name")
    private String name;

    /**
     * url
     */
    @DbField("cp.url")
    private String url;

    /**
     * 样式
     */
    @DbField("cp.modality")
    private String modality;

    /**
     * 支付方式
     */
    @DbField("cp.pay_method")
    private String payMethod;

    @DbField("cp.is_show_sku")
    private Boolean isShowSku;

    @DbField("cp.is_show_logo")
    private Boolean isShowLogo;

    @DbField("cp.filter_goods_ids")
    private String filterGoodsIds;

    /**
     * 浏览数
     */
    @DbIgnore
    private Integer visit;

    /**
     * 邮箱注册人数
     */
    @DbIgnore
    private Integer emailCount;

    /**
     * 手机注册人数
     */
    @DbIgnore
    private Integer phoneCount;

    /**
     * 微信授权注册
     */
    @DbIgnore
    private Integer wechatCount;

    /**
     * 网页端支付订单数
     */
    private Integer numOfOrderWebPay;

    /**
     * 订单数
     */
    @DbIgnore
    private Integer orderCount;

    /**
     * 订单金额
     */
    @DbIgnore
    private BigDecimal orderMoney;

    /**
     * 退款订单数
     */
    @DbIgnore
    private Integer refundCount;

    /**
     * 退款金额
     */
    @DbIgnore
    private BigDecimal refundMoney;

    /**
     * 加粉链接id
     */
    @DbIgnore
    private Long corpCustomerLinkId;

    @DbField("cp.created_time")
    private Date createdTime;

    @DbField("cp.update_time")
    private Date updateTime;


}
