package com.davos.assessment.profile;

import com.davos.assessment.user.AppUser;
import com.davos.assessment.project.Project;
import jakarta.persistence.*;
import java.time.Instant;

@Entity
@Table(name = "profiles")
public class Profile {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;

  @OneToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "user_id", nullable = false)
  private AppUser user;

  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "project_id", nullable = false)
  private Project project;

  @Column(nullable = false)
  private String name;
  @Column(nullable = false)
  private String gender;
  @Column(name = "id_card", nullable = false)
  private String idCard;
  @Column(nullable = false)
  private String phone;
  @Column(name = "birth_month", nullable = false)
  private String birthMonth;
  @Column(nullable = false)
  private String education;
  @Column(name = "school_major", nullable = false)
  private String schoolMajor;
  @Column(nullable = false)
  private String organization;
  @Column(nullable = false)
  private String title;
  @Column(nullable = false)
  private String industry;
  @Column(nullable = false)
  private String city;
  @Column(name = "attendee_type", nullable = false)
  private String attendeeType;
  @Column(name = "updated_at", nullable = false)
  private Instant updatedAt = Instant.now();

  public Long getId() { return id; }
  public Project getProject() { return project; }
  public void setProject(Project project) { this.project = project; }
  public AppUser getUser() { return user; }
  public void setUser(AppUser user) { this.user = user; }
  public String getName() { return name; }
  public void setName(String name) { this.name = name; }
  public String getGender() { return gender; }
  public void setGender(String gender) { this.gender = gender; }
  public String getIdCard() { return idCard; }
  public void setIdCard(String idCard) { this.idCard = idCard; }
  public String getPhone() { return phone; }
  public void setPhone(String phone) { this.phone = phone; }
  public String getBirthMonth() { return birthMonth; }
  public void setBirthMonth(String birthMonth) { this.birthMonth = birthMonth; }
  public String getEducation() { return education; }
  public void setEducation(String education) { this.education = education; }
  public String getSchoolMajor() { return schoolMajor; }
  public void setSchoolMajor(String schoolMajor) { this.schoolMajor = schoolMajor; }
  public String getOrganization() { return organization; }
  public void setOrganization(String organization) { this.organization = organization; }
  public String getTitle() { return title; }
  public void setTitle(String title) { this.title = title; }
  public String getIndustry() { return industry; }
  public void setIndustry(String industry) { this.industry = industry; }
  public String getCity() { return city; }
  public void setCity(String city) { this.city = city; }
  public String getAttendeeType() { return attendeeType; }
  public void setAttendeeType(String attendeeType) { this.attendeeType = attendeeType; }
  public Instant getUpdatedAt() { return updatedAt; }
  public void setUpdatedAt(Instant updatedAt) { this.updatedAt = updatedAt; }
}
