You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.7 KiB
76 lines
1.7 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const PatentSolutionDocVersions = sequelize.define('patentSolutionDocVersions', {
|
|
id: {
|
|
type: DataTypes.BIGINT,
|
|
allowNull: false,
|
|
primaryKey: true,
|
|
autoIncrement: true,
|
|
field: 'id'
|
|
},
|
|
solutionId: {
|
|
type: DataTypes.BIGINT,
|
|
allowNull: false,
|
|
field: 'solution_id',
|
|
references: {
|
|
key: 'id',
|
|
model: 'patent_solutions'
|
|
}
|
|
},
|
|
version: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
field: 'version'
|
|
},
|
|
isCurrent: {
|
|
type: DataTypes.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: true,
|
|
field: 'is_current'
|
|
},
|
|
triggerType: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: 'generate',
|
|
field: 'trigger_type'
|
|
},
|
|
fromVersion: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
field: 'from_version'
|
|
},
|
|
content: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: false,
|
|
field: 'content'
|
|
},
|
|
chapterSnapshot: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
field: 'chapter_snapshot'
|
|
},
|
|
promptSnapshot: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
field: 'prompt_snapshot'
|
|
},
|
|
createAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
defaultValue: sequelize.literal('CURRENT_TIMESTAMP'),
|
|
field: 'create_at'
|
|
}
|
|
}, {
|
|
tableName: 'patent_solution_doc_versions',
|
|
comment: '专利方案整文版本表',
|
|
indexes: []
|
|
});
|
|
|
|
dc.models.PatentSolutionDocVersions = PatentSolutionDocVersions;
|
|
return PatentSolutionDocVersions;
|
|
};
|
|
|