package com.cyksj.model.manage.views;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Data;

import java.util.Date;

/**
 * @author chan
 * @date 2022/10/24 3:51 PM
 */
@Data
@SearchBean(tables = "groups_relation gr left join groups_trips gt on gr.groups_id = gt.id " +
        "left join goods_don_sku sku on gt.sku_id = sku.id  " +
        "left join user u on u.id = gr.user_id " +
        "left join home_group hp on hp.relation_id = gr.id",
        where = "gr.status = 'validity' and  hp.id is null and sku.goods_id = 2 and gr.user_id > 0"
)
public class HomeUserView {

    @DbField("gr.id")
    private Long relationId;

    @DbField("u.id")
    private Long userId;

    @DbField("u.nickname")
    private String nickname;

    @DbField("u.headimgurl")
    private String headimgurl;

    @DbField("gr.account")
    private String account;

    @DbField("sku.spec_val")
    private String specVal;

    @DbField("gr.expiry_time")
    private Date expiryTime;

}
