summary refs log tree commit diff
path: root/dist/models/Channel.js
blob: d4b50395d168dabd218a590d4cde965f7eda7aaf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChannelType = exports.ChannelModel = exports.ChannelSchema = void 0;
const mongoose_1 = require("mongoose");
exports.ChannelSchema = new mongoose_1.Schema({
    id: mongoose_1.Types.Long,
    created_at: { type: mongoose_1.Schema.Types.Date, required: true },
    name: { type: String, required: true },
    type: { type: Number, required: true },
    guild_id: mongoose_1.Types.Long,
    owner_id: mongoose_1.Types.Long,
    parent_id: mongoose_1.Types.Long,
    recipients: [mongoose_1.Types.Long],
    position: Number,
    last_message_id: mongoose_1.Types.Long,
    last_pin_timestamp: Date,
    nsfw: Boolean,
    rate_limit_per_user: Number,
    topic: String,
    permission_overwrites: [
        {
            allow: mongoose_1.Types.Long,
            deny: mongoose_1.Types.Long,
            id: mongoose_1.Types.Long,
            type: Number,
        },
    ],
});
exports.ChannelModel = mongoose_1.model("Channel", exports.ChannelSchema, "channels");
var ChannelType;
(function (ChannelType) {
    ChannelType[ChannelType["GUILD_TEXT"] = 0] = "GUILD_TEXT";
    ChannelType[ChannelType["DM"] = 1] = "DM";
    ChannelType[ChannelType["GUILD_VOICE"] = 2] = "GUILD_VOICE";
    ChannelType[ChannelType["GROUP_DM"] = 3] = "GROUP_DM";
    ChannelType[ChannelType["GUILD_CATEGORY"] = 4] = "GUILD_CATEGORY";
    ChannelType[ChannelType["GUILD_NEWS"] = 5] = "GUILD_NEWS";
    ChannelType[ChannelType["GUILD_STORE"] = 6] = "GUILD_STORE";
})(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
//# sourceMappingURL=Channel.js.map