content: package com.activecourses.upwork.model;
  
  import java.math.BigDecimal;
  import java.time.LocalDateTime;
  import java.util.Set;
  
  import jakarta.persistence.*;
  
  import lombok.AllArgsConstructor;
  import lombok.Builder;
  import lombok.Getter;
  import lombok.NoArgsConstructor;
  import lombok.Setter;
  
  @Getter
  @Setter
  @NoArgsConstructor
  @AllArgsConstructor
  @Builder
  @Entity
  @Table(name = "jobs")
  public class Job {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Integer jobId;
  
      @ManyToOne
      @JoinColumn(name = "client_id")
      private User client;
  
      @Column(nullable = false, length = 255)
      private String title;
  
      @Column(nullable = false, columnDefinition = "TEXT")
      private String description;
  
      @Column(nullable = false)
      private BigDecimal budget;
  
      @Enumerated(EnumType.STRING)
      @Column(nullable = false)
      private JobType jobType;
  
      @Enumerated(EnumType.STRING)
      @Column(nullable = false)
      private JobStatus status;
  
      @Builder.Default
      @Column(nullable = false, updatable = false)
      private LocalDateTime createdAt = LocalDateTime.now();
  
      @ManyToMany
      @JoinTable(
              name = "job_skills",
              joinColumns = @JoinColumn(name = "job_id"),
              inverseJoinColumns = @JoinColumn(name = "skill_id")
      )
      private Set<Skill> skills;
  }