package com.izouma.wenlvju.domain.performance;

import com.izouma.wenlvju.converter.LongArrayConverter;
import com.izouma.wenlvju.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Where(clause = "del = 0")
@ApiModel(value = "节目分组")
public class Arrange extends BaseEntity {
    private Long performanceId;

    private String name;

    @ApiModelProperty(value = "活动地点")
    private String address;

    @ApiModelProperty(value = "活动日期")
    private LocalDate date;

    @ApiModelProperty(value = "上下午")
    private boolean morning;

    @ApiModelProperty(value = "时间安排")
    private LocalTime startTime;

    @ApiModelProperty(value = "时间安排")
    private LocalTime endTime;

    @Convert(converter = LongArrayConverter.class)
    private List<Long> specialtyId;

    @ApiModelProperty(value = "单个节目时长")
    private int duration;

    @ApiModelProperty(value = "节目数量")
    private int quantity;

    @ApiModelProperty(value = "编导姓名")
    private String writerDirector;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty(value = "发布")
    private boolean publish;

    @Transient
    private List<String> specialtyName;

    @Transient
    private String experts;
}
