Skip to content

Commit

Permalink
feat : add entity
Browse files Browse the repository at this point in the history
  • Loading branch information
zini9188 committed Oct 27, 2023
1 parent 2ef0dea commit 54fd0fb
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/main/java/com/tgd/trip/attraction/Attraction.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.tgd.trip.attraction;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

@Entity
@Getter
@Setter
public class Attraction {

@Id
private Long id;
@Column(columnDefinition = "TEXT")
private String title;
private String overview;
private String address;
private String zipCode;
private String tel;
private String imgUrl;
private Double latitude;
private Double longitude;
}
19 changes: 19 additions & 0 deletions src/main/java/com/tgd/trip/attraction/Gugun.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.tgd.trip.attraction;

import lombok.*;

import javax.persistence.*;

@Entity
@Getter
@Setter
@NoArgsConstructor
public class Gugun {

@Id
private Long code;
private String name;
@ManyToOne
@JoinColumn(name = "sido_code")
private Sido sido;
}
17 changes: 17 additions & 0 deletions src/main/java/com/tgd/trip/attraction/Sido.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.tgd.trip.attraction;

import lombok.*;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
@Getter
@Setter
@NoArgsConstructor
public class Sido {

@Id
private Long code;
private String name;
}
21 changes: 21 additions & 0 deletions src/main/java/com/tgd/trip/schedule/Schedule.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.tgd.trip.schedule;

import lombok.*;

import javax.persistence.Entity;
import javax.persistence.Id;

@Getter
@Setter
@Entity
@NoArgsConstructor
public class Schedule {

@Id
private Long scheduleId;
private String title;
private String content;
private Long like;
private String imgUrl;
private boolean viewYn;
}
25 changes: 25 additions & 0 deletions src/main/java/com/tgd/trip/user/User.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.tgd.trip.user;

import lombok.*;

import javax.persistence.*;
import java.time.LocalDate;

@Entity
@Getter
@Setter
@NoArgsConstructor
public class User {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long userId;
private String password;
private String name;
private String email;
private String role;
private String status;
private String provider;
private String providerId;
private LocalDate birth;
}

0 comments on commit 54fd0fb

Please sign in to comment.