package com.cyksj.model.views;

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

import java.util.Date;

/*
 *项目名: netflix
 *文件名: GoodsDonCategoryDetailView
 *创建者: JavaZou
 *创建时间:2023/9/1 13:48
 */
@Getter
@Setter
@SearchBean(tables = "goods_don g left join goods_don_category_relate gcr on gcr.goods_id = g.id" +
		" left join goods_don_category gc on gc.id = gcr.category",
		where = ":condition:",
		groupBy = "g.id,g.title,g.status,g.deleted,g.logo,g.type,g.sort_by,g.virtual_sold,g.created_time,g.update_time")
public class GoodsDonCategoryDetailView {
	@DbField("g.id")
	private Long id;

	/**
	 * 商品名称
	 */
	@DbField("g.title")
	private String title;

	/**
	 * true 上架 / false 下架
	 */
	@DbField("g.status")
	private Boolean status;

	@DbField("g.deleted")
	private Boolean deleted;

	@DbField("g.logo")
	private String logo;

	@DbField("g.type")
	private Integer type;

	/**
	 * 分类
	 * 1、AI  2、流媒体
	 */
	@DbField("group_concat(gc.name)")
	private String categoryName;

	/**
	 * 排序
	 */
	@DbField("g.sort_by")
	private Integer sortBy;

	/**
	 * 虚拟销量
	 */
	@DbField("g.virtual_sold")
	private Integer virtualSold;

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

	@DbField("g.update_time")
	private Date updateTime;
}
