package com.cyksj.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ejlchina.searcher.bean.DbIgnore;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * @author chan
 * @date 2022/9/26 6:31 PM
 */
@Getter
@Setter
public class GroupsRelation extends BaseEntity {

    private Long groupsId;

    private Long userId;

    private Date startTime;

    private Date expiryTime;

    private Integer num;

    /**
     * locking 锁定中
     * overdue 过期
     * validity 有效
     * none 无人
     */
    private Status status;

    /**
     * 账号
     */
    private String account;

    /**
     * 密码
     */
    private String password;

    /***
     * 代充次数
     */
    private Integer rechargeNum;

    /**
     * 代充剩余次数
     */
    private Integer rechargeRemainNum;

    /**
     * gpt卡密
     */
    private String cardKey;

    /**
     * gpt自动充值任务id
     */
    private String gptTaskId;

    /**
     * gpt 代充token
     */
    private String gptToken;

    private Date submitTime;

    private Date sendTime;

    private String operator;

    private RechargeStatus rechargeStatus;

    /**
     * 代充错误信息
     */
    private String rechargeErrorInfo;

    /**
     * 邀请制家庭组链接
     */
    private String inviteLink;

    /**
     * 联系方式
     */
    private String contact;

    /**
     * 备用验证码
     */
    private String bpVerifyCode;

    /**
     * 续费意愿处理状态
     */
    private Boolean renewStatus;

    /**
     * 处理状态
     */
    private Boolean isHandle;

    /**
     * 客服
     */
    private String customerService;

    /**
     * midJourney 登录安全码
     */
    private String verifyCode;

    private Long yhsId;

    /**
     * 店铺类型
     * 0无 1.普通店铺 2.镜像店铺
     */
    private Integer cmt;

    /**
     * 获取权益时的订单id
     */
    @TableField(exist = false)
    @DbIgnore
    private Long orderId;

    /**
     * 更换车票时,新车票id
     */
    @TableField(exist = false)
    @DbIgnore
    private Long newRelationId;


    /**
     * 车队目前可用停车数
     */
    @TableField(exist = false)
    @DbIgnore
    private Integer groupsAvailParkingNum;

    /**
     * 车队最多可用车位数
     */
    @TableField(exist = false)
    @DbIgnore
    private Integer maxNum;

    /**
     * 车票获取类型 默认1购买,2.体验,3.镜像裂变
     */
    private Integer aqType;

    /**
     * 奈飞pinCode
     */
    private String pinCode;

    /**
     * 是否是VIP
     */
    private Boolean isVip;


    /**
     * 是否是claude code 续费
     */
    @DbIgnore
    @TableField(exist = false)
    private Boolean isClaudeCodeRenew;

    /**
     * 是否是claude code 续费升级
     */
    @DbIgnore
    @TableField(exist = false)
    private Boolean isClaudeCodeUpgrade;

    /**
     * 是否被冻结
     * 默认false
     */
    private Boolean isFrozen;

    /**
     * 解冻时长
     */
    private Date unfrozenTime;

    /**
     * 冻结保留天数
     */
    private Integer reservedDays;

	@AllArgsConstructor
    @Getter
    public enum Status{
        locking("锁定中"),
        overdue("过期"),
        validity("有效"),
        none("无人"),
        outside("额外")
        ;

        private String desc;

    }

    @AllArgsConstructor
    @Getter
    public enum RechargeStatus{
        waiting("待充值"),
        complete("已完成"),
        error("账号错误"),
        recharge_error("充值错误"),
        recharging("充值中"),
        ;

        private String desc;

    }
}
