|
| 1 | +package fr.host_dcode.vlib.model; |
| 2 | + |
| 3 | + |
| 4 | +import jakarta.persistence.Entity; |
| 5 | +import jakarta.persistence.GeneratedValue; |
| 6 | +import jakarta.persistence.GenerationType; |
| 7 | +import jakarta.persistence.Id; |
| 8 | + |
| 9 | +import java.time.LocalDateTime; |
| 10 | + |
| 11 | +@Entity |
| 12 | +public class Station { |
| 13 | + |
| 14 | + @Id |
| 15 | + @GeneratedValue(strategy = GenerationType.AUTO) |
| 16 | + private int id; |
| 17 | + private String name; |
| 18 | + private String station_code; |
| 19 | + private double latitude; |
| 20 | + private double longitude; |
| 21 | + private String address; |
| 22 | + private String city; |
| 23 | + private String description; |
| 24 | + private LocalDateTime last_update; |
| 25 | + |
| 26 | + |
| 27 | + public Station(){} |
| 28 | + |
| 29 | + public Station(String name, String stationCode, double latitude, double longitude, String description) { |
| 30 | + this.name = name; |
| 31 | + this.station_code = stationCode; |
| 32 | + this.latitude = latitude; |
| 33 | + this.longitude = longitude; |
| 34 | + this.description = description; |
| 35 | + } |
| 36 | + |
| 37 | + public String getStationCode(){ |
| 38 | + return this.station_code; |
| 39 | + } |
| 40 | + |
| 41 | + public String getName(){ |
| 42 | + return this.name; |
| 43 | + } |
| 44 | + |
| 45 | + public void setName(String name){ |
| 46 | + this.name = name; |
| 47 | + } |
| 48 | + |
| 49 | + public String getDescription(){ |
| 50 | + return this.description; |
| 51 | + } |
| 52 | + |
| 53 | + public void setDescription(String description){ |
| 54 | + this.description = description; |
| 55 | + } |
| 56 | + public Double getLatitude(){ |
| 57 | + return this.latitude; |
| 58 | + } |
| 59 | + public Double getLongitude(){ |
| 60 | + return this.longitude; |
| 61 | + } |
| 62 | + |
| 63 | + public String getAddress(){ |
| 64 | + return this.address; |
| 65 | + } |
| 66 | + |
| 67 | + private void setAddress(String address){ |
| 68 | + this.address = address; |
| 69 | + } |
| 70 | + |
| 71 | + |
| 72 | +} |
0 commit comments