21 lines
632 B
C#
21 lines
632 B
C#
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
using xAiApi.AI.Models.Entities;
|
|
|
|
namespace xAiApi.AI.Configuration.Entities
|
|
{
|
|
public class XAiProjectConfiguration : IEntityTypeConfiguration<XAiProject>
|
|
{
|
|
public void Configure(EntityTypeBuilder<XAiProject> builder)
|
|
{
|
|
//
|
|
// Configure Navigations ...
|
|
builder
|
|
.HasMany(x => x.Conversations)
|
|
.WithOne(x => x.Project)
|
|
.HasForeignKey(x => x.ProjectId)
|
|
.OnDelete(DeleteBehavior.NoAction);
|
|
}
|
|
}
|
|
} |