Ignore:
Timestamp:
01/05/23 12:40:07 (23 months ago)
Author:
andrejtodorovski <82031894+andrejtodorovski@…>
Branches:
main
Children:
f484b14
Parents:
676144b
Message:

Added views and functionalities for deliveryman, warehouseman and admin

Location:
src/main/java/com/example/autopartz/model
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/autopartz/model/Delivery.java

    r676144b r1bd8d1e  
    1818    @Id
    1919    Integer ID_delivery;
    20     String delivery_status;
    21     String delivery_address;
     20    @Column(name = "delivery_status")
     21    String status;
     22    @Column(name = "delivery_address")
     23    String address;
    2224    @ManyToOne
    2325    @JoinColumn(name = "id_user")
  • src/main/java/com/example/autopartz/model/Order.java

    r676144b r1bd8d1e  
    2121    @Id
    2222    @GeneratedValue(strategy = GenerationType.IDENTITY)
    23     Integer ID_order;
     23    @Column(name = "ID_order")
     24    Integer orderid;
    2425    String order_status;
    25     LocalDateTime order_date;
     26    @Column(name = "order_date")
     27    LocalDateTime date;
    2628    @JoinColumn(name = "id_user")
    2729    @ManyToOne
     
    3739        this.order_status = "created";
    3840        this.user = user;
    39         this.order_date = LocalDateTime.now();
     41        this.date = LocalDateTime.now();
    4042    }
    4143
     
    4547        if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
    4648        Order order = (Order) o;
    47         return ID_order != null && Objects.equals(ID_order, order.ID_order);
     49        return orderid != null && Objects.equals(orderid, order.orderid);
    4850    }
    4951
Note: See TracChangeset for help on using the changeset viewer.