package com.izouma.jmrh.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.izouma.jmrh.converter.StringArrayConverter;
import com.izouma.jmrh.enums.OrgStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.List;

@Data
@Entity
@Table(name = "comment_info")
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("回复")
public class Comment extends BaseEntity {

    private Long postId;

    private Long userId;

    @Column(columnDefinition = "TEXT")
    private String content;

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

    private int likeNum;

    private int dislikeNum;

    @Enumerated(EnumType.STRING)
    private OrgStatus status;

    private boolean del;
}
