package com.honey.honey.model;

import jakarta.persistence.*;
import lombok.*;

@Entity
@Table(name = "tasks")
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Task {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;

    @Column(name = "type", nullable = false, length = 20)
    private String type; // referral, follow, other

    @Column(name = "requirement", nullable = false)
    private Long requirement;

    @Column(name = "reward_amount", nullable = false)
    private Long rewardAmount;

    @Column(name = "reward_type", nullable = false, length = 20)
    @Builder.Default
    private String rewardType = "Tickets";

    @Column(name = "display_order", nullable = false)
    @Builder.Default
    private Integer displayOrder = 0;

    @Column(name = "title", nullable = false, length = 255)
    private String title;

    @Column(name = "description", columnDefinition = "TEXT")
    private String description;
}

