package com.izouma.jiashanxia.domain;

import com.izouma.jiashanxia.enums.PackageType;
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.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@ApiModel(value = "用户套餐")
@Where(clause = "del = 0")
public class UserPackage extends BaseEntity {

    private Long userId;

    private Long goodsInfoId;

    @ApiModelProperty(value = "数量")
    private Integer num;

    private String remark;

    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "套餐类型")
    private PackageType type;
}
