package org.wfc.payment.pay.ccpay.model;

import javax.persistence.*;
import java.time.LocalDateTime;

@Entity
@Table(name = "u_credit_card_token")
public class UCreditCardToken {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "user_id", nullable = false)
    private Long userId;

    @Column(name = "token", nullable = false)
    private String token;

    @Column(name = "card_last_four")
    private String cardLastFour;

    @Column(name = "card_type")
    private String cardType;

    @Column(name = "created_at", nullable = false)
    private LocalDateTime createdAt;

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public void setCardLastFour(String cardLastFour) {
        this.cardLastFour = cardLastFour;
    }
    
    public void setCardType(String cardType) {
        this.cardType = cardType;
    }    
}