mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 18:29:08 +00:00
flowtyped everything, some functional, safety, and structural changes
This commit is contained in:
parent
6f3eca7a64
commit
d2aecb38ca
92 changed files with 17554 additions and 1440 deletions
|
@ -1,4 +1,22 @@
|
|||
module.exports = (sql, DataTypes) => {
|
||||
// @flow
|
||||
import type Sequelize, { DataTypes as DT } from 'sequelize'
|
||||
|
||||
export type Category = {
|
||||
hidden: boolean,
|
||||
name: string,
|
||||
roles: string[],
|
||||
type: 'single' | 'multi' | string
|
||||
}
|
||||
|
||||
export type ServerModel = {
|
||||
id: string,
|
||||
categories: {
|
||||
[uuid: string]: Category
|
||||
},
|
||||
message: string
|
||||
}
|
||||
|
||||
export default (sql: Sequelize, DataTypes: DT) => {
|
||||
return sql.define('server', {
|
||||
id: { // discord snowflake
|
||||
type: DataTypes.TEXT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue