Skip to content

Commit

Permalink
feat : question entity 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
ttaehee committed May 13, 2023
1 parent 518ce72 commit eb2e311
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/main/java/com/example/bot/domain/Question.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.example.bot.domain;

import com.example.bot.global.audit.BaseTimeEntity;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Getter
@Entity
@Table(name = "question")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class Question extends BaseTimeEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long id;

@Column(name = "contents", nullable = false)
public String contents;

protected Question(String contents) {
this.contents = contents;
}
}

0 comments on commit eb2e311

Please sign in to comment.