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
 *文件名: CouponClassificationView
 *创建者: JavaZou
 *创建时间:2023/3/20 10:59
 */
@Getter
@Setter
@SearchBean(tables = "coupon_classification cc left join coupon c on cc.id = c.classification_id and c.deleted is true",
		groupBy = "cc.id,cc.name,cc.created_time,cc.update_time")
public class CouponClassificationView {
	@DbField("cc.id")
	private Long id;

	@DbField("cc.name")
	private String name;

	@DbField("count(c.id)")
	private Integer numOfCoupon;

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

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