update new API
All checks were successful
Deploy to Production / deploy (push) Successful in 29s

This commit is contained in:
silverpro89
2026-02-09 23:17:03 +07:00
parent f91cda796e
commit 5957636b07
101 changed files with 6998 additions and 1996 deletions

View File

@@ -1,5 +1,6 @@
const { DataTypes } = require('sequelize');
const { sequelize } = require('../config/database');
const { ref } = require('joi');
const Context = sequelize.define('Context', {
uuid: {
@@ -43,9 +44,17 @@ const Context = sequelize.define('Context', {
comment: 'Prompt configuration object'
},
image: {
type: DataTypes.JSON,
type: DataTypes.TEXT,
comment: 'Array of image URLs'
},
type_context: {
type: DataTypes.STRING(50),
comment: 'Type of context (e.g., example_sentence, dialogue)'
},
type_image: {
type: DataTypes.STRING(50),
comment: 'Type of image (e.g., small, square, normal)'
},
max: {
type: DataTypes.INTEGER,
defaultValue: 1,
@@ -56,6 +65,10 @@ const Context = sequelize.define('Context', {
defaultValue: 0,
comment: '0: Draft, 1: Enriched, 2: Prompt_Ready, 3: Generating, 4: Image_Ready, 5: Approved'
},
reference_id: {
type: DataTypes.UUID,
comment: 'Reference to another entity if applicable'
},
created_at: {
type: DataTypes.DATE,
defaultValue: DataTypes.NOW