package com.izouma.jiashanxia.domain;

import com.izouma.jiashanxia.enums.SetType;
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.math.BigDecimal;
import java.util.List;

@Data
@Builder
@Entity
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "套餐信息")
public class SetMeal extends BaseEntity {

    @ApiModelProperty(value = "套餐名称")
    private String name;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "套餐标签")
    private String tag;

    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    @Column(columnDefinition = "TEXT")
    @ApiModelProperty(value = "详情")
    private String detail;

    @ApiModelProperty(value = "套餐类型")
    private SetType type;

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

//    @OneToMany(cascade = CascadeType.DETACH)
//    @JoinColumn(name = "set_goods_id")
//    private List<SetGoods> setGoods;
}
