1
0

TgBotSendLog.ts 812 B

123456789101112131415161718192021222324252627282930
  1. import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
  2. @Index('idx_botId', [ 'botId' ], {})
  3. @Index('idx_groupId', [ 'groupId' ], {})
  4. @Entity('tg_bot_send_log', { schema: 'tgbot' })
  5. export default class TgBotSendLog {
  6. @PrimaryGeneratedColumn({ type: 'int', name: 'id', unsigned: true })
  7. id: number;
  8. @Column('bigint', { name: 'botId', comment: '机器人Id' })
  9. botId: number;
  10. @Column('bigint', { name: 'groupId', comment: '群id' })
  11. groupId: string;
  12. @Column('text', { name: 'text', nullable: true, comment: '发送消息' })
  13. text: string | null;
  14. @Column('datetime', {
  15. name: 'createTime',
  16. default: () => 'CURRENT_TIMESTAMP',
  17. })
  18. createTime: Date;
  19. @Column('datetime', {
  20. name: 'updateTime',
  21. default: () => 'CURRENT_TIMESTAMP',
  22. })
  23. updateTime: Date;
  24. }