Ignore:
Timestamp:
07/07/23 12:14:58 (16 months ago)
Author:
HristijanMitic00 <hristijan.mitic.01@…>
Branches:
main
Parents:
1dd9226
Message:

First commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/project/fmo/app/projcetfmo/Model/Cena.java

    r1dd9226 rd14176d  
    1 package model;
     1package project.fmo.app.projcetfmo.Model;
    22
    3 import jakarta.persistence.*;
     3import javax.persistence.*;
    44
    55import java.sql.Date;
     
    77
    88@Entity
     9@Table(schema = "project", name = "cena",  catalog = "db_202223z_va_prj_fmo")
    910@IdClass(CenaPK.class)
    1011public class Cena {
    11     @GeneratedValue(strategy = GenerationType.IDENTITY)
    1212    @Id
    1313    @Column(name = "id_produkt")
    14     private int idProdukt;
    15     @GeneratedValue(strategy = GenerationType.IDENTITY)
     14    private int  idProdukt;
    1615    @Id
    1716    @Column(name = "cena_od")
     
    2322    @Column(name = "iznos")
    2423    private int iznos;
     24
     25    public Cena(){}
     26    public Cena(int idProdukt, Date cenaOd, Date cenaDo, int iznos) {
     27        this.idProdukt = idProdukt;
     28        this.cenaOd = cenaOd;
     29        this.cenaDo = cenaDo;
     30        this.iznos = iznos;
     31    }
     32
     33    public Cena(int idProdukt, Date cenaOd, int iznos) {
     34        this.idProdukt = idProdukt;
     35        this.cenaOd = cenaOd;
     36        this.iznos = iznos;
     37    }
    2538
    2639    public int getIdProdukt() {
Note: See TracChangeset for help on using the changeset viewer.