package com.izouma.jiashanxia.domain;

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.Transient;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@ApiModel("优惠券")
@Where(clause = "del = 0")
public class Coupon extends BaseEntity {
    @ApiModelProperty(value = "品牌")
    private Long attractionsId;

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

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

    private BigDecimal price;

    private String content;

    @ApiModelProperty(value = "有效期")
    private LocalDateTime period;

    @ApiModelProperty(value = "适用门店")
    private String store;

    @Transient
    private String attractionsName;
}
