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;

/**
 * 项目名: yhlxj
 * 文件名: NetflixErrorRecoverView
 * 创建者: JavaZou
 * 创建时间:2025/6/24 13:45
 */
@Getter
@Setter
@SearchBean(tables = "netflix_user_account_submit_recover_record ar left join goods_don_sku sku on sku.id = ar.sku_id" +
		" left join goods_don g on g.id = sku.goods_id" +
		" left join user u on u.id = ar.user_id")
public class NetflixErrorRecoverView {
	@DbField("ar.id")
	private Long id;

	@DbField("ar.user_id")
	private Long userId;

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

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

	@DbField("g.id")
	private Long goodsId;

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

	@DbField("ar.sku_id")
	private Long skuId;

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

	@DbField("ar.remain_days")
	private Integer remainDays;

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

	/**
	 * 0未更换 1.替换成功 2.车票失效
	 */
	@DbField("ar.status")
	private Integer status;

	/**
	 * 位置
	 */
	@DbField("select count(1) + 1 from netflix_user_account_submit_recover_record ar2 where ar2.created_time < ar.created_time and ar2.status = 0")
	private Integer indx;
}
