using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace IWS5.DatabaseAccess.IwsDataModels;

[Table("ATConnection")]
public partial class Atconnection
{
    [Key]
    public int Id { get; set; }

    [StringLength(50)]
    public string Name { get; set; } = null!;

    public int Type { get; set; }

    [StringLength(255)]
    public string ConnectionString { get; set; } = null!;

    [StringLength(50)]
    public string UserName { get; set; } = null!;

    [StringLength(50)]
    public string Password { get; set; } = null!;

    [StringLength(50)]
    public string? Options { get; set; }

    [StringLength(255)]
    public string? Description { get; set; }

    [StringLength(255)]
    public string? DefaultFrom { get; set; }

    [StringLength(255)]
    public string? DefaultReplyTo { get; set; }

    [InverseProperty("DbConnection")]
    public virtual ICollection<AtdocumentCabinet> AtdocumentCabinets { get; set; } = new List<AtdocumentCabinet>();

    [InverseProperty("Connection")]
    public virtual ICollection<Atmail> Atmails { get; set; } = new List<Atmail>();

    [InverseProperty("DbConnection")]
    public virtual ICollection<Attemplate> Attemplates { get; set; } = new List<Attemplate>();

    [ForeignKey("Type")]
    [InverseProperty("Atconnections")]
    public virtual AtconnectionType TypeNavigation { get; set; } = null!;
}
