package com.izouma.wenlvju.domain;

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

import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Where(clause = "del = 0")
@ApiModel(value = "承办单位合作")
public class Collaborate extends BaseEntity {
    private Long rateId;

    private Long gradingOrganizationId;

    @Column(columnDefinition = "TEXT")
    @Convert(converter = StringArrayConverter.class)
    private List<String> consent;

    @Column(columnDefinition = "TEXT")
    @Convert(converter = LongArrayConverter.class)
    private List<Long> artTypeId;
}
