package com.lesingle.creation.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lesingle.creation.common.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 竞赛报名表实体类
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_biz_contest_registration")
public class ContestRegistration extends BaseEntity {

    /**
     * 赛事 ID
     */
    @TableField("contest_id")
    private Long contestId;

    /**
     * 所属租户 ID
     */
    @TableField("tenant_id")
    private Long tenantId;

    /**
     * 报名类型：individual/team
     */
    @TableField("registration_type")
    private String registrationType;

    /**
     * 团队 ID
     */
    @TableField("team_id")
    private Long teamId;

    /**
     * 团队名称快照
     */
    @TableField("team_name")
    private String teamName;

    /**
     * 账号 ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 报名账号
     */
    @TableField("account_no")
    private String accountNo;

    /**
     * 报名账号名称
     */
    @TableField("account_name")
    private String accountName;

    /**
     * 报名角色快照：leader/member/mentor
     */
    @TableField("role")
    private String role;

    /**
     * 报名状态：pending/passed/rejected/withdrawn
     */
    @TableField("registration_state")
    private String registrationState;

    /**
     * 参与者类型：self-自己/child-代子女报名
     */
    @TableField("participant_type")
    private String participantType;

    /**
     * 子女 ID
     */
    @TableField("child_id")
    private Long childId;

    /**
     * 实际报名人用户 ID
     */
    @TableField("registrant")
    private Long registrant;

    /**
     * 报名时间
     */
    @TableField("registration_time")
    private LocalDateTime registrationTime;

    /**
     * 审核理由
     */
    @TableField("reason")
    private String reason;

    /**
     * 审核人用户 ID
     */
    @TableField("operator")
    private Long operator;

    /**
     * 审核时间
     */
    @TableField("operation_date")
    private LocalDateTime operationDate;

    /**
     * 有效状态：1-有效，2-失效
     */
    @TableField("valid_state")
    private Integer validState;

    /**
     * 指导老师 ID 列表（JSON）
     */
    @TableField("teacher_ids")
    private String teacherIds;
}
