package kr.co.zioinfo.web.model;

import jakarta.persistence.*;
import lombok.*;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Entity @Table(name = "recruit")
@Getter @Setter @Builder @NoArgsConstructor @AllArgsConstructor
@EntityListeners(AuditingEntityListener.class)
public class Recruit {
    @Id @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(nullable = false, length = 200)
    private String title;

    @Column(length = 50)
    private String department;   // 개발팀, 영업팀, 기획팀 등

    @Column(length = 20)
    private String jobType;      // 정규직, 계약직, 인턴

    @Column(columnDefinition = "TEXT")
    private String description;  // 담당업무

    @Column(columnDefinition = "TEXT")
    private String requirements; // 지원자격

    @Column(columnDefinition = "TEXT")
    private String preferred;    // 우대사항

    private LocalDate deadline;
    private int headcount = 1;
    private boolean active = true;

    @CreatedDate
    private LocalDateTime createdAt;
}
