nestjs-express-cassandra
Version:
Express-cassandra module for Nest framework
46 lines (37 loc) • 690 B
text/typescript
import {
Column,
CreateDateColumn,
TimeUUIDColumn,
UpdateDateColumn,
UUIDColumn,
VersionColumn,
} from '../../../decorators/column.decorator';
import { Entity } from '../../../decorators/entity.decorator';
<PostEntity>({
key: ['postId'],
})
export class PostEntity {
({
type: 'int',
})
postId!: number;
()
userId?: string;
()
dateID?: string;
()
version?: string;
({
type: 'text',
rule: { required: true },
})
title!: string;
({
type: 'text',
})
content?: string;
()
createdAt?: string;
()
updatedAt?: string;
}