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 java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@ApiModel("用户优惠券")
@Where(clause = "del = 0")
public class UserCoupon extends BaseEntity {
    private Long userId;

    private Long couponId;

    @ApiModelProperty(value = "是否已使用")
    private boolean isUse;

    private LocalDateTime useTime;

    @ApiModelProperty(value = "核销人")
    private Long writeOffUserId;

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


}
