package com.izouma.nineth.dto;

import com.izouma.nineth.converter.EncryptConverter;
import com.izouma.nineth.domain.UserBaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

@Data
@Entity
@Table(indexes = {
        @Index(columnList = "userId")
})
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UserBankCard extends UserBaseEntity {

    private Long userId;

    private String bank;

    private String bankName;

    private String cardType;

    private String cardTypeDesc;

    @Convert(converter = EncryptConverter.class)
    private String bankNo;

    private String phone;

    private String realName;

    @Convert(converter = EncryptConverter.class)
    private String idNo;
}
