/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 实体类
 *
 * @author Chill
 */
@Data
@TableName("blade_user_app")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "UserApp对象", description = "UserApp对象")
public class UserApp extends Model<UserApp> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "主键")
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	private Long id;

	/**
	 * 用户ID
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "用户ID")
	private Long userId;

	/**
	 * 用户拓展信息
	 */
	@ApiModelProperty(value = "用户拓展信息")
	private String userExt;

	/**
	 * 推荐人ID
	 */
	@ApiModelProperty(value = "推荐人ID")
	private Long parentId;

	/**
	 * 推荐人字符串集合
	 */
	@ApiModelProperty(value = "推荐人字符串集合")
	private String parentPath;

	/**
	 * 酒票数
	 */
	@ApiModelProperty(value = "绿色积分")
	private Double ticket;
	/**
	 * 积分
	 */
	@ApiModelProperty(value = "红色积分")
	private Double integral;
	/**
	 * 信用积分
	 */
	@ApiModelProperty(value = "信誉分")
	private Integer creditScore;
	/**
	 * 二维码地址
	 */
	@ApiModelProperty(value = "二维码地址")
	private String codeUrl;
	/**
	 * 账号状态
	 */
	@ApiModelProperty(value = "账号状态：1正常，2冻结，3删除")
	private Integer state;

	/**
	 * 是否有特殊权限
	 */
	@ApiModelProperty(value = "是否有特殊权限")
	private Integer enableAuth;

	/**
	 * 角色字段：1为城市合伙人，2为创客，3为两者皆有
	 */
	@ApiModelProperty(value = "角色字段：1为城市合伙人，2为创客，3为两者皆有")
	private Integer isRole;

	/**
	 * 简介说明
	 */
	@ApiModelProperty(value = "简介说明")
	private String userExplain;

	/**
	 * 当前余额
	 */
	@ApiModelProperty(value = "当前余额")
	private BigDecimal nowMoney;

	/**
	 * 余额加速
	 */
	@ApiModelProperty(value = "加速额度")
	private BigDecimal accBalance;

	/**
	 * 红包余额
	 */
	@ApiModelProperty(value = "红包余额,用于抢到的红包")
	private BigDecimal redMoney;

	/**
	 * 支付宝用户ID
	 */
	@ApiModelProperty(value = "支付宝用户ID")
	private String alipayUserId;

	@ApiModelProperty(value = "支付密码")
	private String payPassword;

	@ApiModelProperty(value = "偏移值")
	private String offsetCode;

	@ApiModelProperty(value = "是否生活馆账号:0 否 1 是")
	private Integer livingHall;
}
