|
|
@@ -3,7 +3,6 @@ package nju.seec.helper.entity;
|
|
|
import lombok.Data;
|
|
|
import lombok.experimental.Accessors;
|
|
|
import nju.seec.helper.enums.UserRole;
|
|
|
-import org.hibernate.annotations.CacheConcurrencyStrategy;
|
|
|
import org.hibernate.annotations.CreationTimestamp;
|
|
|
import org.hibernate.annotations.DynamicInsert;
|
|
|
import org.hibernate.annotations.DynamicUpdate;
|
|
|
@@ -17,12 +16,15 @@ import java.time.LocalDateTime;
|
|
|
@Data
|
|
|
@Accessors(chain = true)
|
|
|
@Entity
|
|
|
-@Table(name = "user", uniqueConstraints = {@UniqueConstraint(name = "user_phone_unique", columnNames = "phone"),
|
|
|
- @UniqueConstraint(name = "user_email_unique", columnNames = "email")})
|
|
|
+@Table(name = "user", uniqueConstraints = {
|
|
|
+ @UniqueConstraint(name = "user_phone_unique", columnNames = "phone")
|
|
|
+// , @UniqueConstraint(name = "user_email_unique", columnNames = "email")
|
|
|
+}
|
|
|
+)
|
|
|
@DynamicUpdate
|
|
|
@DynamicInsert
|
|
|
-@Cacheable
|
|
|
-@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
|
|
+//@Cacheable
|
|
|
+//@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
|
|
public class User {
|
|
|
@Id
|
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|