Editting entities
This commit is contained in:
parent
057047d4b4
commit
43d9689a68
@ -13,9 +13,9 @@ public class Code {
|
|||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Column(name="name", nullable = false, unique = true)
|
@Column(name="value")
|
||||||
private Long value;
|
private Long value;
|
||||||
|
|
||||||
@Column(name = "value", nullable = false, unique = true)
|
@Column(name ="name")
|
||||||
private String name;
|
private String name;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.example.nto.entity;
|
package com.example.nto.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import io.micrometer.core.annotation.TimedSet;
|
||||||
import liquibase.pro.packaged.C;
|
import liquibase.pro.packaged.C;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@ -18,22 +19,17 @@ public class Enter {
|
|||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ManyToMany
|
@OneToOne
|
||||||
@JoinTable(
|
@JoinColumn(name="code_id")
|
||||||
name = "enter_employee", // Name of the join table
|
private Code code;
|
||||||
joinColumns = @JoinColumn(name = "enter_id"), // Column for this entity
|
|
||||||
inverseJoinColumns = @JoinColumn(name = "employee_id") // Column for the other entity
|
|
||||||
)
|
|
||||||
private Set<Employee> employees;
|
|
||||||
|
|
||||||
@ManyToMany
|
@OneToOne
|
||||||
@JoinTable(
|
@JoinColumn(name="employee_id")
|
||||||
name = "enter_code", // Name of the join table
|
private Employee employee;
|
||||||
joinColumns = @JoinColumn(name = "enter_id"), // Column for this entity
|
|
||||||
inverseJoinColumns = @JoinColumn(name = "code_id") // Column for the other entity
|
@Column(name="entered_at")
|
||||||
)
|
|
||||||
private Set<Code> codes;
|
|
||||||
@Column(nullable = false)
|
|
||||||
private Timestamp entered_at;
|
private Timestamp entered_at;
|
||||||
|
|
||||||
|
@Column(name="enter_type")
|
||||||
|
private String enterType;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user