<commit_before>﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Anlab.Core.Models;
using Newtonsoft.Json;

namespace Anlab.Core.Domain
{
    public class Order :IDatedEntity
    {

        public int Id { get; set; }
        
        [Required]
        public string CreatorId { get; set; }

        [ForeignKey("CreatorId")]
        public User Creator { get; set; }

        [StringLength(256)]
        [Required]
        public string Project { get; set; }

        [StringLength(16)]
        public string LabId { get; set; }

        [StringLength(16)]
        public string ClientId { get; set; }
        
        public string AdditionalEmails { get; set; }
        
        public string JsonDetails { get; set; }

        public DateTime Created { get; set; }
        public DateTime Updated { get; set; }

        public string Status { get; set; }

        public ICollection<MailMessage> MailMessages { get; set; }

        public OrderDetails GetOrderDetails()
        {
            try
            {
                return JsonConvert.DeserializeObject<OrderDetails>(JsonDetails);
            }
            catch (JsonSerializationException)
            {
                return new OrderDetails();
            }
        }

        public void SaveDetails(OrderDetails details)
        {
            JsonDetails = JsonConvert.SerializeObject(details);
        }

    }
}<commit_msg>Add an OrderRequest field<commit_after>﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Anlab.Core.Models;
using Newtonsoft.Json;

namespace Anlab.Core.Domain
{
    public class Order :IDatedEntity
    {

        public int Id { get; set; }
        
        [Required]
        public string CreatorId { get; set; }

        [ForeignKey("CreatorId")]
        public User Creator { get; set; }

        [StringLength(256)]
        [Required]
        public string Project { get; set; }

        [StringLength(16)]
        public string LabId { get; set; }

        [StringLength(16)]
        public string ClientId { get; set; }
        
        public string AdditionalEmails { get; set; }
        
        public string JsonDetails { get; set; }

        public DateTime Created { get; set; }
        public DateTime Updated { get; set; }

        public string Status { get; set; }

        public string OrderRequest { get; set; }

        public ICollection<MailMessage> MailMessages { get; set; }

        public OrderDetails GetOrderDetails()
        {
            try
            {
                return JsonConvert.DeserializeObject<OrderDetails>(JsonDetails);
            }
            catch (JsonSerializationException)
            {
                return new OrderDetails();
            }
        }

        public void SaveDetails(OrderDetails details)
        {
            JsonDetails = JsonConvert.SerializeObject(details);
        }

    }
}
{'fraction_non_alphanumeric': 0.08457069076823757, 'fraction_numerical': 0.004519044544867657, 'mean_word_length': 1.962715105162524, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4979827', 'n_tokens_mistral': 810, 'n_tokens_neox': 777, 'n_words': 214}