revised includes edited user entity

This commit is contained in:
heyethereum
2024-07-11 00:22:27 +08:00
parent 878c8e2349
commit ccd6baf0d7
24 changed files with 635 additions and 15 deletions

View 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;
}