@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@TableName("ls_emp_info")
public class EmpInfo implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@TableId(value = "c_id")
private Integer cid;
@Column(name = "c_name")
@TableField(value = "c_name")
private String cameraName;
@Column(name = "c_brand")
@TableField(value = "c_brand")
private String cameraBrand;
@ManyToMany
@JoinTable(
name = "Camera_User",
joinColumns = @JoinColumn(name = "cid"),
inverseJoinColumns = @JoinColumn(name = "uid")
)
@TableField(exist = false)
private List<User> cameraUser; // 不映射数据库表字段
@TableField(exist = false) // 不映射数据库表字段
private String postMutex;
@TableField(exist = true) // 映射数据库表字段
private String postName;
}