const mongoose = require("mongoose");

const userSchema = new mongoose.Schema(
  {
      fake: { type: Number, default: 0 },
      callId: { type: String, default: "" },
      referrer: { type: String, default: 0 },
      agency: { type: Number, default: 0 },
      IsAgent: { type: Number, default: 0 },
      state: { type: Number, default: 0 },
      fullname: { type: String, default: "" },
      salt: String,
      passw: { type: String, default: "" },
      login: { type: String, default: "" },
      uid: Number,
      gender: { type: Number, default: 0 },
      email: { type: String, default: "" },
      diamond: { type: Number, default: 0 },
      silverPoints: { type: Number, default: 0 },
      goldPoints: { type: Number, default: 0 },
      fireRank: { type: Number, default: 0 },
      level: { type: Number, default: 1 },
      exp_points: { type: Number, default: 0 },
      country: { type: String, default: "" },
      phone: { type: String, default: "" },
      fb_id: { type: String, default: "" },
      gl_id: { type: String, default: "" },
      regtime: { type: Number, default: 0 },
      balance: { type: Number, default: 0 },
      tradingBalance: { type: Number, default: 0 },
      sex: { type: Number, default: 0 },
      age: { type: Number, default: 0 },
      last_authorize: { type: Number, default: 0 },
      ip_addr: { type: String, default: "" },
        reg_country: { type: String, default: "" },
      image: { type: String, default: "" },
      defaultBackground: { type: String, default: "" },
      bio: { type: String, default: "" },
      verified: { type: Number, default: 0 },
      location: { type: String, default: "" },
      latitude: { type: String, default: "" },
      longitude: { type: String, default: "" },
      mood: { type: Number, default: 0 },
      year: { type: Number, default: 0 },
      month: { type: Number, default: 0 },
      day: { type: Number, default: 0 },
      verify: { type: Number, default: 0 },
      itemsCount: { type: Number, default: 0 },
      galleryItemsCount: { type: Number, default: 0 },
      likesCount: { type: Number, default: 0 },
      giftsCount: { type: Number, default: 0 },
      friendsCount: { type: Number, default: 0 },
      followingsCount: { type: Number, default: 0 },
      followersCount: { type: Number, default: 0 },
      allowComments: { type: Number, default: 0 },
      allowMessages: { type: Number, default: 0 },
      lastAuthorize: { type: Number, default: 0 },
      accountType: { type: Number, default: 0 },
      allowCalls: { type: Number, default: 1 },
      allowScreenshots: { type: Number, default: 0 },
      allowShowMyInfo: { type: Number, default: 0 },
      allowShowMyFriends: { type: Number, default: 0 },
      allowShowMyGallery: { type: Number, default: 0 },
      allowShowMyGifts: { type: Number, default: 0 },
      allowGalleryComments: { type: Number, default: 0 },
      distance: { type: Number, default: 0 },
      streamId: { type: String, default: "" },
      lastAuthorizeDate: { type: String, default: "" },
      lastAuthorizeTimeAgo: { type: String, default: "" },
      blocked: { type: Boolean, default: false },
      inBlackList: { type: Boolean, default: false },
      online: { type: Boolean, default: false },
  },
  {
    timestamps: true,
    versionKey: false,
  }
);

module.exports = mongoose.model("users", userSchema);
