package com.izouma.dingdong.domain.user;

import com.izouma.dingdong.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.Column;
import javax.persistence.Entity;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Where(clause = "enabled = 1")
@ApiModel(value = "意见反馈")
public class Feedback extends BaseEntity {
    @ApiModelProperty(value = "用户Id", name = "userId")
    private Long userId;

    @ApiModelProperty(value = "内容", name = "content")
    @Column(nullable = false)
    private String content;

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

    @ApiModelProperty(value = "联系人", name = "name")
    private String name;

    @ApiModelProperty(value = "电话", name = "phone")
    private String phone;

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