Proyecto ChatBot Con Gemini
This commit is contained in:
13
ChatbotApi/Data/AppContexto.cs
Normal file
13
ChatbotApi/Data/AppContexto.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
// ChatbotApi/Data/Models/AppContexto.cs
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
|
||||
namespace ChatbotApi.Data.Models
|
||||
{
|
||||
public class AppContexto : IdentityDbContext
|
||||
{
|
||||
public AppContexto(DbContextOptions<AppContexto> options) : base(options) { }
|
||||
|
||||
public DbSet<ContextoItem> ContextoItems { get; set; } = null!;
|
||||
public DbSet<ConversacionLog> ConversacionLogs { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
25
ChatbotApi/Data/Models/ContextoItem.cs
Normal file
25
ChatbotApi/Data/Models/ContextoItem.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
// Data/Models/ContextoItem.cs
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ChatbotApi.Data.Models
|
||||
{
|
||||
public class ContextoItem
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string Clave { get; set; } = null!;
|
||||
|
||||
[Required]
|
||||
[MaxLength(2000)]
|
||||
public string Valor { get; set; } = null!;
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? Descripcion { get; set; }
|
||||
|
||||
public DateTime FechaActualizacion { get; set; }
|
||||
}
|
||||
}
|
||||
18
ChatbotApi/Data/Models/ConversacionLog.cs
Normal file
18
ChatbotApi/Data/Models/ConversacionLog.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ChatbotApi.Data.Models
|
||||
{
|
||||
public class ConversacionLog
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public string UsuarioMensaje { get; set; } = null!;
|
||||
|
||||
[Required]
|
||||
public string BotRespuesta { get; set; } = null!;
|
||||
|
||||
public DateTime Fecha { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user