relation.ts 687 B

123456789101112131415161718192021222324252627282930313233343536
  1. import {
  2. Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn, ManyToOne, Index,
  3. } from 'typeorm';
  4. import { Installation } from './installation';
  5. @Entity()
  6. @Index(['installation', 'growiUri'], { unique: true })
  7. export class Relation {
  8. @PrimaryGeneratedColumn()
  9. readonly id: number;
  10. @CreateDateColumn()
  11. readonly createdAt: Date;
  12. @UpdateDateColumn()
  13. readonly updatedAt: Date;
  14. @ManyToOne(() => Installation)
  15. readonly installation: Installation;
  16. @Column()
  17. @Index({ unique: true })
  18. tokenGtoP: string;
  19. @Column()
  20. @Index()
  21. tokenPtoG: string;
  22. @Column()
  23. growiUri: string;
  24. @Column('simple-array')
  25. siglePostCommands: string[];
  26. }