Parent Directory
|
Revision Log
chore: add old version archive branches (2.x to 9.x-dev)
1 | rakinar2 | 577 | import { DataTypes, Model } from 'sequelize'; |
2 | import DiscordClient from '../client/Client'; | ||
3 | |||
4 | class Ballot extends Model {} | ||
5 | |||
6 | Ballot.init({ | ||
7 | // Model attributes are defined here | ||
8 | id: { | ||
9 | type: DataTypes.INTEGER, | ||
10 | autoIncrement: true, | ||
11 | primaryKey: true, | ||
12 | }, | ||
13 | content: { | ||
14 | type: DataTypes.STRING, | ||
15 | allowNull: false | ||
16 | }, | ||
17 | author: { | ||
18 | type: DataTypes.STRING, | ||
19 | allowNull: true | ||
20 | }, | ||
21 | msg_id: { | ||
22 | type: DataTypes.STRING, | ||
23 | allowNull: false | ||
24 | }, | ||
25 | channel_id: { | ||
26 | type: DataTypes.STRING, | ||
27 | allowNull: false | ||
28 | }, | ||
29 | guild_id: { | ||
30 | type: DataTypes.STRING, | ||
31 | allowNull: false | ||
32 | }, | ||
33 | date: { | ||
34 | type: DataTypes.DATE, | ||
35 | allowNull: false, | ||
36 | } | ||
37 | }, { | ||
38 | sequelize: DiscordClient.client.db.sequelize, | ||
39 | modelName: 'Ballot', | ||
40 | timestamps: false, | ||
41 | }); | ||
42 | |||
43 | export default Ballot; |
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |