[1.03.20] ID generation AUTO

This commit is contained in:
andyjk15 2020-03-01 23:12:18 +00:00
parent d8306622e7
commit 956a5643ac
2 changed files with 2 additions and 3 deletions

View File

@ -12,8 +12,8 @@ import java.time.LocalDateTime;
public class CryptoPriceModel {
@Id
@Column(name = "ID", nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID", nullable = false, unique = true)
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@Column(name = "timestamp", nullable = false)

View File

@ -37,5 +37,4 @@ type Query {
type Mutation {
createBtc(createdDate: String!, type: String!, average_price: Float!, high_price: Float, low_price: Float, open_price: Float, close_price: Float, volume: Float):BtcPrice
createTweet(createdDate: String!, rawTweet: String!, sentimentScore: Float!, positiveScore: Float, neutralScore: Float, negativeScore: Float, compoundScore: Float!):tweetModel
}