Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 1x 1x 1x 1x 1x | import {Model} from 'sequelize';
import sequelize from '@db';
/**
* Model for invites.
*
* With an invite a user can join a group.
*/
export class Invite extends Model {
/**
* The id of the user.
*/
public userId!: number;
/**
* The id of the group.
*/
public groupId!: number;
/**
* The id of the user which send this invite.
*/
public invitedBy!: number;
/**
* The date and time when the invite was created.
*/
public createdAt!: Date;
}
Invite.init(
{},
{
sequelize,
modelName: 'invite',
updatedAt: false, // Only use createdAt
},
);
export default Invite;
|