package com.izouma.dingdong.domain.backstage;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.izouma.dingdong.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import javax.validation.constraints.Size;
import java.io.Serializable;

@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Where(clause = "active = 1")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer"})
@ApiModel(value = "商家性质", description = "商家性质")
public class MerchantNature extends BaseEntity implements Serializable {
    @Size(max = 30)
    @Column(length = 30)
    @ApiModelProperty(value = "名称", name = "name")
    private String name;

    @Column(nullable = false)
    private Boolean active = true;

}
