using Edge.Core.Processor.Dispatcher;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Reflection;
using System.Text;
using System.Text.Json;

namespace Edge.Core.Database.Configuration.Models
{
    public class ProcessorMetaConfigDbModel
    {
        [Key]
        public int Id { get; set; }

        [Required]
        public string Name { get; set; }
        public string Description { get; set; }
        public ProcessorTypeEnum Type { get; set; }

        public IEnumerable<ProcessorMetaPartsMetaConfigDbModel> Parts { get; set; }
        public bool Activated { get; set; }
        public DateTime TimeStamp { get; set; }
    }


    public class ProcessorMetaPartsMetaConfigDbModel
    {
        [Key]
        public int Id { get; set; }

        public int ProcessorMetaConfigId { get; set; }
        public virtual ProcessorMetaConfigDbModel ProcessorMetaConfig { get; set; }

        public ProcessorMetaPartsTypeEnum Type { get; set; }

        [Required]
        public string FullTypeString { get; set; }
        public string ParametersJsonArrayStr { get; set; }
    }
}
