65 lines
1.4 KiB
JavaScript
65 lines
1.4 KiB
JavaScript
import { Model, DataTypes } from 'sequelize';
|
|
import { sequelize } from '../../utils/sequelize.js';
|
|
|
|
class EroticContentReport extends Model {}
|
|
|
|
EroticContentReport.init({
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
primaryKey: true,
|
|
autoIncrement: true
|
|
},
|
|
reporterId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
field: 'reporter_id'
|
|
},
|
|
targetType: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
field: 'target_type'
|
|
},
|
|
targetId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
field: 'target_id'
|
|
},
|
|
reason: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false
|
|
},
|
|
note: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: true
|
|
},
|
|
status: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: 'open'
|
|
},
|
|
actionTaken: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
field: 'action_taken'
|
|
},
|
|
handledBy: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
field: 'handled_by'
|
|
},
|
|
handledAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: true,
|
|
field: 'handled_at'
|
|
}
|
|
}, {
|
|
sequelize,
|
|
modelName: 'EroticContentReport',
|
|
tableName: 'erotic_content_report',
|
|
schema: 'community',
|
|
timestamps: true,
|
|
underscored: true
|
|
});
|
|
|
|
export default EroticContentReport;
|