mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-05-21 08:11:14 +08:00
add the logic to save chat record when open boss manually
This commit is contained in:
49
packages/sqlite-plugin/src/entity/ChatMessageRecord.ts
Normal file
49
packages/sqlite-plugin/src/entity/ChatMessageRecord.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { requireTypeorm } from "../utils/module-loader";
|
||||
const { Entity, Column, PrimaryGeneratedColumn } = requireTypeorm()
|
||||
|
||||
@Entity()
|
||||
export class ChatMessageRecord {
|
||||
@PrimaryGeneratedColumn()
|
||||
mid: number;
|
||||
|
||||
@Column()
|
||||
encryptFromUserId: string;
|
||||
|
||||
@Column()
|
||||
encryptToUserId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
time: Date | null;
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
type?: 'text' | 'image' | 'resume';
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
style?: 'sent' | 'receive';
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
text: string;
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
imageUrl?: string;
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
imageWidth?: number;
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
imageHeight?: number;
|
||||
}
|
||||
Reference in New Issue
Block a user