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 Date submitTime;

    private Date sendTime;

    private String operator;

    private RechargeStatus rechargeStatus;

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

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

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

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

    private Long yhsId;

    /**
     * 获取权益时的订单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;


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

        private String desc;

    }

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

        private String desc;

    }
}
