package com.cyksj.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.DbIgnore;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/*
 *项目名: netflix
 *文件名: EquipmentUserPayRecord
 *创建者: JavaZou
 *创建时间:2023/8/9 18:25
 */
@Getter
@Setter
@SearchBean(tables = "equipment_user_pay_record er")
public class EquipmentUserPayRecord extends BaseEntity{
	/**
	 * 受益人id
	 */
	@DbField("er.share_id")
	private Long shareId;

	/**
	 * 被邀请人id
	 */
	@DbField("er.user_id")
	private Long userId;

	@DbField("er.order_id")
	private Long orderId;

	@DbField("er.status")
	private Status status;

	@DbIgnore
	@TableField(exist = false)
	private String nickname;

	@DbIgnore
	@TableField(exist = false)
	private Date payTime;

	@DbIgnore
	@TableField(exist = false)
	private String headImg;

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


	@Getter
	public enum Status {
		hasPayment("已购买"),
		waiting("待到账"),
		refund("已退款"),
		;
		String msg;

		Status(String msg) {
			this.msg = msg;
		}
	}
}
