package com.izouma.dingdong.domain.merchant;

import com.izouma.dingdong.domain.BaseEntity;
import com.izouma.dingdong.enums.ComplaintTarget;
import com.izouma.dingdong.enums.Solution;
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.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.time.LocalDateTime;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Where(clause = "enabled = 1")
//@JsonIgnoreProperties(value = { "hibernateLazyInitializer"})
@ApiModel(value = "投诉商家表", description = "投诉商家表")
public class MerchantComplaint extends BaseEntity {
    @ApiModelProperty(value = "投诉用户Id",name = "userId")
    private Long userId;

    @ApiModelProperty(value = "商家ID", name = "merchantId")
    private Long merchantId;

    @ApiModelProperty(value = "投诉类型", name = "type")
    private String type;

    @ApiModelProperty(value = "图片", name = "img")
    private String img;

    @ApiModelProperty(value = "具体内容", name = "content")
    private String content;

/*    @ApiModelProperty(value = "是否解决", name = "resolve")
    private Boolean resolve = false;*/

    @ApiModelProperty(value = "投诉时间", name = "time")
    private LocalDateTime time;

    @Column(nullable = false)
    private Boolean enabled = true;
}
