Skip to content

Commit

Permalink
πŸ› autoincrementing entity ID for vote
Browse files Browse the repository at this point in the history
  • Loading branch information
haliphax committed Aug 3, 2022
1 parent 6bac932 commit 74cb4de
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/models/vote.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { Entity, Fields } from 'remult';
import { Participant } from './participant';
//import { Story } from './story';

@Entity('vote', { allowApiCrud: true })
@Entity('vote', {
allowApiCrud: true,
id: entity => entity.find('id'),
})
export class Vote {
@Fields.autoIncrement()
id!: number;

@Fields.string()
storyId = '';

Expand Down

0 comments on commit 74cb4de

Please sign in to comment.