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

namespace IWS5.DatabaseAccess.IwsDataModels;

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

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

    [Column("EventID")]
    public int EventId { get; set; }

    [Column("ProcessID")]
    public int ProcessId { get; set; }

    public int? ConnectionId { get; set; }

    [StringLength(512)]
    public string Recipient { get; set; } = null!;

    [Column("CC")]
    [StringLength(256)]
    public string? Cc { get; set; }

    [Column("BCC")]
    [StringLength(256)]
    public string? Bcc { get; set; }

    [StringLength(256)]
    public string? From { get; set; }

    [StringLength(256)]
    public string? Reply { get; set; }

    [StringLength(256)]
    public string? Subject { get; set; }

    public string? Message { get; set; }

    public bool Enable { get; set; }

    public byte Priority { get; set; }

    [ForeignKey("ConnectionId")]
    [InverseProperty("Atmails")]
    public virtual Atconnection? Connection { get; set; }

    [ForeignKey("EventId")]
    [InverseProperty("Atmails")]
    public virtual AteventDefinition Event { get; set; } = null!;

    [ForeignKey("ProcessId")]
    [InverseProperty("Atmails")]
    public virtual AtprocessDefinition Process { get; set; } = null!;
}
