cache-item.entity.ts 553 B

123456789101112131415161718192021222324
  1. import { DeepPartial } from '@vendure/common/lib/shared-types';
  2. import { Column, Entity, Index } from 'typeorm';
  3. import { VendureEntity } from '../../entity/base/base.entity';
  4. @Entity()
  5. export class CacheItem extends VendureEntity {
  6. constructor(input: DeepPartial<CacheItem>) {
  7. super(input);
  8. }
  9. @Column({ precision: 3 })
  10. insertedAt: Date;
  11. @Index('cache_item_key')
  12. @Column({ unique: true })
  13. key: string;
  14. @Column('text')
  15. value: string;
  16. @Column({ nullable: true, precision: 3 })
  17. expiresAt?: Date;
  18. }