package com.zhentao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 活动报名记录实体类
 */
@Data
@TableName("activity_registration")
public class ActivityRegistration implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    private Integer activityId;
    private Integer userId;
    
    @TableField("registration_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime registrationTime;
    
    private Integer status; // 1: 已报名, 2: 已取消, 3: 已签到
    
    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;
    
    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;
    
    // 活动信息（关联查询时使用）
    @TableField(exist = false)
    private String activityName;
    
    @TableField(exist = false)
    private String coverImage;
    
    @TableField(exist = false)
    private LocalDateTime startTime;
    
    @TableField(exist = false)
    private LocalDateTime endTime;
    
    @TableField(exist = false)
    private String location;
    
    @TableField(exist = false)
    private Double price;
    
    @TableField(exist = false)
    private Integer maxParticipants;
    
    @TableField(exist = false)
    private Integer actualParticipants;
    
    @TableField(exist = false)
    private Integer activityStatus;
}


