order.ts 873 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import {
  2. Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn, ManyToOne, OneToOne,
  3. } from 'typeorm';
  4. import { Installation } from './installation';
  5. import { Relation } from './relation';
  6. @Entity()
  7. export class Order {
  8. @PrimaryGeneratedColumn()
  9. readonly id: number;
  10. @CreateDateColumn()
  11. readonly createdAt: Date;
  12. @UpdateDateColumn()
  13. readonly updatedAt: Date;
  14. @ManyToOne(() => Installation)
  15. readonly installation: number;
  16. @OneToOne(() => Relation, relation => relation.order)
  17. relation: Relation;
  18. @Column({ nullable: true, default: false })
  19. isCompleted?: boolean;
  20. @Column({ nullable: true })
  21. growiUrl?: string;
  22. @Column({ nullable: true })
  23. growiAccessToken?: string;
  24. @Column({ nullable: true })
  25. proxyAccessToken?: string;
  26. isExpired():boolean {
  27. // TODO GW-5555 implement this
  28. return false;
  29. }
  30. }