1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 21:23:24 +01:00
server/dist/models/User.js

107 lines
3.2 KiB
JavaScript

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserModel = exports.UserSchema = void 0;
const Activity_1 = require("./Activity");
const Status_1 = require("./Status");
const mongoose_1 = require("mongoose");
const Database_1 = __importDefault(require("../util/Database"));
exports.UserSchema = new mongoose_1.Schema({
id: mongoose_1.Types.Long,
username: String,
discriminator: String,
avatar: String,
fingerprints: [String],
phone: String,
desktop: Boolean,
mobile: Boolean,
premium: Boolean,
premium_type: Number,
bot: Boolean,
system: Boolean,
nsfw_allowed: Boolean,
mfa_enabled: Boolean,
created_at: Number,
verified: Boolean,
email: String,
flags: mongoose_1.Types.Long,
public_flags: mongoose_1.Types.Long,
hash: String,
valid_tokens_since: Number,
user_settings: {
afk_timeout: Number,
allow_accessibility_detection: Boolean,
animate_emoji: Boolean,
animate_stickers: Number,
contact_sync_enabled: Boolean,
convert_emoticons: Boolean,
custom_status: {
emoji_id: mongoose_1.Types.Long,
emoji_name: String,
expires_at: Number,
text: String,
},
default_guilds_restricted: Boolean,
detect_platform_accounts: Boolean,
developer_mode: Boolean,
disable_games_tab: Boolean,
enable_tts_command: Boolean,
explicit_content_filter: Number,
friend_source_flags: { all: Boolean },
gif_auto_play: Boolean,
// every top guild is displayed as a "folder"
guild_folders: [
{
color: Number,
guild_ids: [mongoose_1.Types.Long],
id: Number,
name: String,
},
],
guild_positions: [mongoose_1.Types.Long],
inline_attachment_media: Boolean,
inline_embed_media: Boolean,
locale: String,
message_display_compact: Boolean,
native_phone_integration_enabled: Boolean,
render_embeds: Boolean,
render_reactions: Boolean,
restricted_guilds: [mongoose_1.Types.Long],
show_current_game: Boolean,
status: String,
stream_notifications_enabled: Boolean,
theme: String,
timezone_offset: Number,
},
relationships: [
{
id: mongoose_1.Types.Long,
nickname: String,
type: Number,
user_id: mongoose_1.Types.Long,
},
],
connected_accounts: [
{
access_token: String,
friend_sync: Boolean,
id: String,
name: String,
revoked: Boolean,
show_activity: Boolean,
type: String,
verifie: Boolean,
visibility: Number,
},
],
presence: {
status: String,
activities: [Activity_1.Activity],
client_status: Status_1.ClientStatus,
},
});
// @ts-ignore
exports.UserModel = Database_1.default.model("User", exports.UserSchema, "users");
//# sourceMappingURL=User.js.map