revised includes edited user entity
This commit is contained in:
30
src/main/java/com/safeqr/app/qrcode/entity/QRCode.java
Normal file
30
src/main/java/com/safeqr/app/qrcode/entity/QRCode.java
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
package com.safeqr.app.qrcode.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@Table(name = "qr_code", schema = "safeqr")
|
||||
@Data
|
||||
public class QRCode {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(generator = "UUID")
|
||||
@GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator")
|
||||
@Column(updatable = false, nullable = false)
|
||||
private UUID id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "qr_code_type_id", nullable = false)
|
||||
private QRCodeType qrCodeType;
|
||||
|
||||
private String userId;
|
||||
private String contents;
|
||||
|
||||
@Column(name = "created_at", insertable = false, updatable = false)
|
||||
private String createdAt;
|
||||
}
|
||||
20
src/main/java/com/safeqr/app/qrcode/entity/QRCodeType.java
Normal file
20
src/main/java/com/safeqr/app/qrcode/entity/QRCodeType.java
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
package com.safeqr.app.qrcode.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Data;
|
||||
|
||||
@Entity
|
||||
@Table(name = "qr_code_types", schema = "safeqr")
|
||||
@Data
|
||||
public class QRCodeType {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
private String type;
|
||||
private String description;
|
||||
private String prefix;
|
||||
private String tableName;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
package com.safeqr.app.qrcode.entity;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name = "safe_browsing_cache", schema = "safeqr")
|
||||
public class SafeBrowsingCache {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(generator = "UUID")
|
||||
@GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator")
|
||||
private UUID id;
|
||||
|
||||
private String hashPrefix;
|
||||
private String threatType;
|
||||
private String platformType;
|
||||
private String threatEntryType;
|
||||
private String fullHash;
|
||||
}
|
||||
Reference in New Issue
Block a user