0.0.6 • Published 3 years ago

nestjs-express-cassandra v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Description

express-cassandra module for Nest.

Installation

$ npm i --save nestjs-express-cassandra

Usage

@Entity<PostEntity>({
  key: ['postId'],
})
export class PostEntity {
  @Column({
    type: 'int',
  })
  postId!: number;

  @UUIDColumn()
  userId?: string;

  @TimeUUIDColumn()
  dateID?: string;

  @VersionColumn()
  version?: string;

  @Column({
    type: 'text',
    rule: { required: true },
  })
  title!: string;

  @Column({
    type: 'text',
  })
  content?: string;

  @CreateDateColumn()
  createdAt?: string;

  @UpdateDateColumn()
  updatedAt?: string;
}

Browse sample folder for more examples.

License

MIT licensed.