SHARE
TWEET

Untitled

a guest Apr 20th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Field, ObjectType, ID } from 'type-graphql'
  2. import {
  3.   Entity,
  4.   ObjectIdColumn,
  5.   ObjectID,
  6.   Column,
  7.   CreateDateColumn,
  8.   UpdateDateColumn,
  9. } from 'typeorm'
  10.  
  11. @ObjectType()
  12. @Entity()
  13. export default class Policy {
  14.   @Field(type => ID)
  15.   @ObjectIdColumn()
  16.   _id: ObjectID
  17.  
  18.   @Field()
  19.   @CreateDateColumn({ type: 'timestamp' })
  20.   createdAt: Date
  21.  
  22.   @Field({ nullable: true })
  23.   @UpdateDateColumn({ type: 'timestamp', nullable: true })
  24.   updatedAt?: Date
  25.  
  26.   @Field()
  27.   @Column()
  28.   name: string
  29.  
  30.   @Field()
  31.   @Column()
  32.   version: number
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top