package com.sikey.wa04.business.infrastructure.dto.model;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.ColumnDefault;

import java.time.Instant;

@Getter
@Setter
@Entity
@Table(name = "tb_child_school_disable")
@Accessors(chain = true)
public class ChildSchoolDisableModel extends BaseModel {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    @Size(max = 36)
    @NotNull
    @Column(name = "child_id", nullable = false, length = 36)
    private String childId;

    @Size(max = 10)
    @NotNull
    @Column(name = "repeats", nullable = false, length = 10)
    private String repeats;

    @Size(max = 52)
    @Column(name = "start_time", length = 52)
    private String startTime;

    @Size(max = 52)
    @Column(name = "end_time", length = 52)
    private String endTime;

    @NotNull
    @ColumnDefault("0")
    @Column(name = "status", nullable = false)
    private Boolean status;

    @Column(name = "deleted_at")
    private Instant deletedAt;

}