package dev.ksan.etfoglasiserver.model;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

import java.util.Set;
import java.util.UUID;

@Entity
@Table(name = "subjects")
public class Subject {

  @Getter
  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  @Column(columnDefinition = "uuid")
  private UUID id;

  @Getter
  @Setter
  @Column private long code;

  @Getter
  @Setter
  @Column(nullable = false)
  private String name;



  @ManyToMany(mappedBy = "subjectSet", fetch = FetchType.LAZY)
  Set<User> users;
  public Subject(){
  }

}
