Initial move
This commit is contained in:
33
frontend/src/model/message.ts
Normal file
33
frontend/src/model/message.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
export interface IMessage {
|
||||
id: number;
|
||||
channelId?: number;
|
||||
content: string;
|
||||
fileId?: number;
|
||||
fileType?: string;
|
||||
filePath?: string;
|
||||
fileSize?: number;
|
||||
originalName?: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export class Message implements IMessage {
|
||||
id: number;
|
||||
content: string;
|
||||
fileId?: number;
|
||||
fileType?: string;
|
||||
filePath?: string;
|
||||
fileSize?: number;
|
||||
originalName?: string;
|
||||
createdAt: string;
|
||||
|
||||
constructor(message: IMessage) {
|
||||
this.id = message.id;
|
||||
this.content = message.content;
|
||||
this.fileId = message.fileId;
|
||||
this.fileType = message.fileType;
|
||||
this.filePath = message.filePath;
|
||||
this.fileSize = message.fileSize;
|
||||
this.originalName = message.originalName;
|
||||
this.createdAt = message.createdAt;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user