| 123456789101112131415161718192021222324252627282930 |
- import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
- @Index('idx_botId', [ 'botId' ], {})
- @Index('idx_groupId', [ 'groupId' ], {})
- @Entity('tg_bot_send_log', { schema: 'tgbot' })
- export default class TgBotSendLog {
- @PrimaryGeneratedColumn({ type: 'int', name: 'id', unsigned: true })
- id: number;
- @Column('bigint', { name: 'botId', comment: '机器人Id' })
- botId: number;
- @Column('bigint', { name: 'groupId', comment: '群id' })
- groupId: string;
- @Column('text', { name: 'text', nullable: true, comment: '发送消息' })
- text: string | null;
- @Column('datetime', {
- name: 'createTime',
- default: () => 'CURRENT_TIMESTAMP',
- })
- createTime: Date;
- @Column('datetime', {
- name: 'updateTime',
- default: () => 'CURRENT_TIMESTAMP',
- })
- updateTime: Date;
- }
|