package com.cyksj.model.views;

import com.cyksj.model.entity.CouponUser;
import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * 项目名: yhlxj
 * 文件名: CouponReceiptDetailView
 * 创建者: JavaZou
 * 创建时间:2024/4/16 16:58
 */
@Getter
@Setter
@SearchBean(tables = "(select id,name from coupon where deleted is true :cid:) c inner join coupon_user cu on cu.coupon_id = c.id inner join user u on u.id = cu.user_id")
public class CouponReceiptDetailView {

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

	@DbField("c.id")
	private Long couponId;

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

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

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

	@DbField("cu.status")
	private CouponUser.Status status;

	@DbField("cu.created_time")
	private Date receiptTime;

	@DbField("cu.valid_end_time")
	private Date expiryTime;
}
