package com.itsol.quantrivanphong.model;

import com.itsol.quantrivanphong.model.Project;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "issues")
public class Issues {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false, unique = true)
    private int id;
// tiêu đề liên quan
    @Column(name = "title")
    private String title;
//nội dung
    @Column(name = "content")
    private String actionCode;
// trạng thái vấn đề đó trong project
    @Column(name = "status")
    private boolean status;

    @ManyToOne(fetch = FetchType.EAGER)
    private Project project;
}
