All checks were successful
Build, Push and Deploy / build-and-deploy (push) Successful in 1m43s
72 lines
1.3 KiB
Java
72 lines
1.3 KiB
Java
package de.iwomm.propify_api.entity;
|
|
|
|
import jakarta.persistence.*;
|
|
import java.time.LocalDateTime;
|
|
import java.util.UUID;
|
|
|
|
@Entity
|
|
public class Organization {
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.UUID)
|
|
@Column(nullable = false)
|
|
private UUID id;
|
|
|
|
@Column(nullable = false)
|
|
private String name;
|
|
|
|
@ManyToOne()
|
|
@JoinColumn(name = "industry_id")
|
|
private Industry industry;
|
|
|
|
@Column
|
|
private String owner;
|
|
|
|
@Column(nullable = false)
|
|
private LocalDateTime createdAt;
|
|
|
|
@PrePersist
|
|
protected void onCreate() {
|
|
this.createdAt = LocalDateTime.now();
|
|
}
|
|
|
|
public UUID getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(UUID id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public Industry getIndustry() {
|
|
return industry;
|
|
}
|
|
|
|
public void setIndustry(Industry industry) {
|
|
this.industry = industry;
|
|
}
|
|
|
|
public String getOwner() {
|
|
return owner;
|
|
}
|
|
|
|
public void setOwner(String owner) {
|
|
this.owner = owner;
|
|
}
|
|
|
|
public LocalDateTime getCreatedAt() {
|
|
return createdAt;
|
|
}
|
|
|
|
public void setCreatedAt(LocalDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
}
|
|
}
|