package com.yc.ship.module.trade.dal.dataobject.order;

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.yc.ship.framework.mybatis.core.dataobject.TenantSyncDO;
import com.yc.ship.framework.tenant.core.db.TenantBaseDO;
import com.yc.ship.module.trade.enums.CredentialTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 游客 DO
 *
 * @author 管理员
 */
@TableName("trade_visitor")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TradeVisitorDO extends TenantSyncDO {

    /**
     * 主键
     */
    @TableId(type= IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private Long id;

    /**
     * 游客ID
     */
    private String vid;
    /**
     * 明细ID
     */
    private Long detailId;

    /**
     * 订单ID
     */
    private Long orderId;
    /**
     * 游客姓名
     */
    @Schema(description = "游客姓名")
    private String name;
    /**
     * 性别
     */
    @Schema(description = "性别")
    private Integer gender;
    /**
     * 证件号
     */
    @Schema(description = "证件号")
    private String credentialNo;

    /**
     * 国籍
     */
    @Schema(description = "国籍")
    private String nationality;

    @Schema(description = "生日")
    private String birthday;


    /**
     * 证件类型
     * 关联 {@link CredentialTypeEnum}
     */
    @Schema(description = "证件类型")
    private Integer credentialType;

    @Schema(description = "证件类型名称")
    @TableField(exist = false)
    private String credentialTypeName;

    @Schema(description = "房型名称")
    @TableField(exist = false)
    private String roomModelName;
    /**
     * 手机号
     */
    @Schema(description = "手机号")
    private String mobile;
    /**
     * 分销商的明细ID
     */
    @Schema(description = "分销商的明细ID")
    private String otaDetailId;
    /**
     * 是否投保 0否 1是
     */
    private Integer isInsure;

    @Schema(description = "投保信息")
    private String insureMsg;

    @Schema(description = "是否推送实名制系统")
    private Integer isPush;

    @Schema(description = "分销商的明细ID")
    @TableField(exist = false)
    private String voucherCode;

    @Schema(description = "关联的游客ID")
    @TableField(exist = false)
    private Long associatedVisitorId;

    @Schema(description = "是否宜昌中转 0：否 1是")
    private Integer yczz;

    @Schema(description = "是否重庆中转 0：否 1是")
    private Integer cqzz;

    private String roomId;
    private String cohabitation;
    @TableField(exist = false)
    private String jzTime;
    @TableField(exist = false)
    private String jzPhone;
    @TableField(exist = false)
    private String jzCard;
    @TableField(exist = false)
    private String jzAddress;

    @Schema(description = "国籍名称")
    @TableField(exist = false)
    private String nationalityName;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "预分房间ID", example = "")
    private String initRoomId;

    @Schema(description = "实际入住房间ID", example = "")
    private String finalRoomId;

    @Schema(description = "入住日期", example = "")
    private String inDate;

    @Schema(description = "离开日期", example = "")
    private String outDate;

    @Schema(description = "年龄", example = "")
    private Integer age;

    @Schema(description = "游客类型", example = "")
    private String type;

    @Schema(description = "地址", example = "")
    private String address;

    @Schema(description = "产品类型 0 游船产品 1 附加产品 2：赠票", example = "")
    @TableField(exist = false)
    private Integer productType;

    /**
     * 订单房型的唯一ID，查询入住房型的信息
     */
    private String roomIndexId;

    @Schema(description = "区域", example = "")
    private String area;

    @Schema(description = "房型ID", example = "")
    private Long roomModelId;

    @Schema(description = "楼层", example = "")
    private Integer floor;


    /**
     * 入住类型
     * 1:实际入住 2:临时入住 3:预分房
     */
    @Schema(description = "入住类型", example = "")
    @TableField(exist = false)
    private String occupancyType;

    @Schema(description = "是否独居")
    @TableField(exist = false)
    private Integer isAlone;

    @Schema(description = "是否具备同住关系", example = "")
    @TableField(exist = false)
    private Integer isHaveTogethers;


    @Schema(description = "价格", example = "")
    @TableField(exist = false)
    private BigDecimal price;

    @Schema(description = "价格", example = "")
    @TableField(exist = false)
    private BigDecimal actualPrice;
}