I am a java rookie, ask some rookie questions?
use spring-boot to develop projects, spring-data-jpa to access databases,
there are many fields in the database, but only some of them are used by the client, while the data needed by the background is more comprehensive, for example:
Field of entity:
import lombok.Data;
import javax.persistence.*;
import java.util.Date;
@Data
@Entity
@Table(name = "account")
public class Account {
@Id
@GeneratedValue
private Long id;
private String nickName; //
private Integer status; //
private String gender; //
private String signature; //
private Date updatedAt; //
private Date createdAt; //
private Date loginAt; //
private String loginIp; // IP
private String adminNote; //
}
this table is used by the: id, nickName, gender, signature client page. The other fields do not want to be seen by the user, but the administrator should see,
how should the entity class be designed? do you want to do two entity classes?
do I use graphql, to communicate between the front end and the back end? do the front and back ends generate different Schema