// Path: lolibox-server/src/main/java/io/loli/box/social/SocialMediaService.java
// public enum SocialMediaService {
//     WEIBO
// }


import io.loli.box.social.SocialMediaService;
import javax.persistence.*;
import java.util.Date;
package io.loli.box.entity;



@Entity
@Table(name = "user_accounts")
public class User {

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

    @Column(name = "email", length = 100, nullable = false, unique = true)
    private String email;

    @Column(name = "user_name", length = 100, nullable = false,unique = true)
    private String userName;

    @Column(name = "password", length = 255)
    private String password;

    @Enumerated(EnumType.STRING)
    @Column(name = "role", length = 20, nullable = false)
    private Role role;

    @Enumerated(EnumType.STRING)
    @Column(name = "sign_in_provider", length = 20)
// Path: lolibox-server/src/main/java/io/loli/box/social/SocialMediaService.java
// public enum SocialMediaService {
//     WEIBO
// }


// Path: lolibox-server/src/main/java/io/loli/box/entity/User.java
import io.loli.box.social.SocialMediaService;
import javax.persistence.*;
import java.util.Date;

package io.loli.box.entity;



@Entity
@Table(name = "user_accounts")
public class User {

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

    @Column(name = "email", length = 100, nullable = false, unique = true)
    private String email;

    @Column(name = "user_name", length = 100, nullable = false,unique = true)
    private String userName;

    @Column(name = "password", length = 255)
    private String password;

    @Enumerated(EnumType.STRING)
    @Column(name = "role", length = 20, nullable = false)
    private Role role;

    @Enumerated(EnumType.STRING)
    @Column(name = "sign_in_provider", length = 20)
    private SocialMediaService signInProvider;