Skip to content

Commit

Permalink
add type to channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed Feb 29, 2024
1 parent 30b5bcd commit f5d10bd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ Channel {
name?: string | null,
parent_id?: string | null,
permissionOverwrites?: IOverwrite[],
deletedAt?: Date | null
deletedAt?: Date | null,
type: number
}
```

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@togethercrew.dev/db",
"version": "3.0.28",
"version": "3.0.29",
"description": "All interactions with DB",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/Channel.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ export interface IChannel {
parentId?: string | null;
permissionOverwrites?: IOverwrite[];
deletedAt?: Date | null;
type: number
}

export interface IChannelUpdateBody {
name?: string | null;
parentId?: string | null;
permissionOverwrites?: IOverwrite[];
deletedAt?: Date | null;
type?: number
}
export interface IChannelMethods {
softDelete: () => void;
Expand Down
3 changes: 3 additions & 0 deletions src/models/schemas/Channel.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const channelSchema = new Schema<IChannel, ChannelModel>({
parentId: {
type: String,
},
type: {
type: Number,
},
permissionOverwrites: [
{
id: String, // or use mongoose.Schema.Types.ObjectId if Snowflake is an ObjectId
Expand Down

0 comments on commit f5d10bd

Please sign in to comment.