Initial commit again

This commit is contained in:
2024-04-29 20:32:49 +02:00
parent 97dc6d222a
commit 9a60709d56
117 changed files with 101 additions and 13571 deletions

35
api/src/models/User.ts Normal file
View File

@ -0,0 +1,35 @@
import { DataTypes, Model } from 'sequelize'
import path from 'path'
import db from '../config/sequelize.config.ts'
class Instance extends Model {}
Instance.init(
{
_id: {
type: DataTypes.UUID,
primaryKey: true,
allowNull: false,
unique: true,
},
username: {
type: DataTypes.STRING,
allowNull: false,
},
password: {
type: DataTypes.STRING,
allowNull: false,
},
email: {
type: DataTypes.STRING,
allowNull: false,
unique: true,
},
},
{
sequelize: db,
tableName: path.basename(__filename).split('.')[0].toLowerCase(),
},
)
export default Instance