nitro-react/src/api/friends/MessengerThreadChatGroup.ts

42 lines
812 B
TypeScript
Raw Normal View History

2021-12-09 04:14:54 +01:00
import { GroupType } from './GroupType';
2021-09-22 03:48:00 +02:00
import { MessengerThreadChat } from './MessengerThreadChat';
export class MessengerThreadChatGroup
{
private _userId: number;
private _chats: MessengerThreadChat[];
2021-12-09 04:14:54 +01:00
private _type: number;
2021-09-22 03:48:00 +02:00
2021-12-09 04:14:54 +01:00
constructor(userId: number, type = GroupType.PRIVATE_CHAT)
2021-09-22 03:48:00 +02:00
{
this._userId = userId;
this._chats = [];
2021-12-09 04:14:54 +01:00
this._type = type;
2021-09-22 03:48:00 +02:00
}
public addChat(message: MessengerThreadChat): void
{
this._chats.push(message);
}
public get userId(): number
{
return this._userId;
}
public get chats(): MessengerThreadChat[]
{
return this._chats;
}
2021-12-09 04:14:54 +01:00
public get type(): number
{
return this._type;
}
public set type(type: number)
{
this._type = type;
}
2021-09-22 03:48:00 +02:00
}