package com.cyksj.model.views;

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

/*
 *项目名: netflix
 *文件名: UserBindAccountView
 *创建者: JavaZou
 *创建时间:2023/8/1 15:37
 */
@Getter
@Setter
@SearchBean(tables = "user u")
public class UserBindAccountView {
	@DbField("u.id")
	private Long userId;

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

	@DbField("u.headimgurl")
	private String img;

	@DbField("case when login_phone != '' then login_phone when email != '' then email else null end")
	private String account;

	/**
	 * 1手机号 2、邮箱 3、微信
	 */
	@DbField("case when login_phone != '' then 1 when email != '' then 2 else 3 end")
	private Integer type;
}
