| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package com.deliveryproject.easydelivery.Models;
- import javax.persistence.*;
- import java.util.List;
- @Entity
- @Table(name = "users")
- public class AppUser {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
- private Long id;
- @Column(name = "client_id", nullable = false, unique = true)
- private String clientId;
- @Column(name = "name", nullable = false)
- private String name;
- @OneToMany //(mappedBy = "user")
- private List<Delivery> deliveries;
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getClientId() {
- return clientId;
- }
- public void setClientId(String clientId) {
- this.clientId = clientId;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public List<Delivery> getDeliveries() {
- return deliveries;
- }
- public void setDeliveries(List<Delivery> deliveries) {
- this.deliveries = deliveries;
- }
- }
|