package com.kym.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 停车券发放记录表
 * </p>
 *
 * @author skyline
 * @since 2026-06-12
 */
@Getter
@Setter
@TableName("t_parking_coupon_record")
@Accessors(chain = true)
public class ParkingCouponRecord extends BaseEntity {

    private static final long serialVersionUID = 1L;

    public static final int STATUS_未使用 = 0;
    public static final int STATUS_已使用 = 1;

    /**
     * UUID唯一标识
     */
    private String code;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 站点ID
     */
    private String stationId;

    /**
     * 触发发放的订单号
     */
    private String orderId;

    /**
     * 停车券目标URL
     */
    private String targetUrl;

    /**
     * 状态：0-未使用，1-已使用
     */
    private Integer status;

    /**
     * 使用时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime usedTime;

    /**
     * 过期时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime expireTime;
}
