secajs/src/models/ContactDetailsSet.js

39 lines
857 B
JavaScript
Raw Normal View History

2025-03-08 00:25:56 +01:00
class ContactDetailsSetProvider {
constructor({ sequelize, DataTypes }) {
this.sequelize = sequelize;
this.DataTypes = DataTypes;
}
2025-02-14 01:32:03 +01:00
2025-03-08 00:25:56 +01:00
provide() {
const ContactDetailsSet = this.sequelize.define(
'ContactDetailsSet',
{
uuid: {
type: this.DataTypes.UUID,
allowNull: false,
unique: true,
primaryKey: true,
},
public_key: {
type: this.DataTypes.STRING,
allowNull: false,
},
encrypted_contact_details: {
type: this.DataTypes.TEXT,
allowNull: false,
},
created_at: {
type: this.DataTypes.DATE,
allowNull: false,
},
},
{
tableName: 'contact_details_set',
}
);
return ContactDetailsSet;
2025-02-14 11:13:18 +01:00
}
2025-03-08 00:25:56 +01:00
}
2025-02-14 01:32:03 +01:00
2025-03-08 00:25:56 +01:00
module.exports = ContactDetailsSetProvider;