This repository has been archived on 2025-11-04. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
know-it-all/server/models/Organization.js

28 lines
710 B
JavaScript

const { v4: uuidv4 } = require('uuid');
const { DataTypes, Model } = require('sequelize');
class Organization extends Model {
static initModel(sequelize) {
Organization.init(
{
orgID: {
type: DataTypes.STRING,
primaryKey: true,
defaultValue: uuidv4,
},
orgName: {
type: DataTypes.STRING,
allowNull: false,
},
createdAt: {
type: DataTypes.DATE,
},
},
{ sequelize }
);
return Organization;
}
}
module.exports = Organization;