<commit_before>﻿using Oak;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CreateDB
{
    class Schema
    {
        Seed seed;
        internal Schema(Seed seed)
        {
            this.seed = seed;
        }

        public IEnumerable<Func<dynamic>> Scripts()
        {
            yield return CreateJournalTable;
            yield return CreateWorkflowTable;
            yield return CreateProcessTable;
        }

        public string CreateJournalTable()
        {
            return seed.CreateTable("Journals",
                new { Id = "int", Identity = true, PrimaryKey = true },
                new { Date = "datetime", Nullable = false },
                new { Thread = "nvarchar(255)", Nullable = false },
                new { Level = "nvarchar(50)", Nullable = false },
                new { Logger = "nvarchar(255)", Nullable = false },
                new { Logger_method = "nvarchar(255)", Nullable = false },
                new { Message = "nvarchar(4000)", Nullable = false },
                new { Exception = "nvarchar(max)", Nullable = false },
                new { Stacktrace = "nvarchar(max)", Nullable = false }
            );
        }
        public string CreateWorkflowTable()
        {<commit_msg>Appointments<commit_after>﻿using Oak;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CreateDB
{
    class Schema
    {
        Seed seed;
        internal Schema(Seed seed)
        {
            this.seed = seed;
        }

        public IEnumerable<Func<dynamic>> Scripts()
        {
            yield return CreateJournalTable;
            yield return CreateWorkflowTable;
            yield return CreateProcessTable;
            yield return CreateAppointmentTable;
        }

        public string CreateAppointmentTable()
        {
            return seed.CreateTable("Appointments",
                new { Id = "int", Identity = true, PrimaryKey = true },
                new { ExternalId = "nvarchar(2048)", Nullable = true },
                new { LastModified = "datetime", Nullable = false },
                new { Category = "nvarchar(2048)", Nullable = true },

                new { Location = "nvarchar(max)", Nullable = true },
                new { Content = "nvarchar(max)", Nullable = true },
                new { Title = "nvarchar(max)", Nullable = true },
                new { DateFrom = "datetime", Nullable = false },
                new { DateTo = "datetime", Nullable = false },
                new { Reminder = "datetime", Nullable = true },
                new { Notification = "bit", Nullable = false },
                new { IsPrivate = "bit", Nullable = false },
                new { Priority = "tinyint", Nullable = false }                
            );
        }

        public string CreateJournalTable()
        {
            return seed.CreateTable("Journals",
                new { Id = "int", Identity = true, PrimaryKey = true },
                new { Date = "datetime", Nullable = false },
                new { Thread = "nvarchar(255)", Nullable = false },
                new { Level = "nvarchar(50)", Nullable = false },
                new { Logger = "nvarchar(255)", Nullable = false },
                new { Logger_method = "nvarchar(255)", Nullable = false },
                new { Message = "nvarchar(4000)", Nullable = false },
                new { Exception = "nvarchar(max)", Nullable = false },
                new { Stacktrace = "nvarchar(max)", Nullable = false }
            );
        }
        public string CreateWorkflowTable()
        {
{'fraction_non_alphanumeric': 0.10903679653679654, 'fraction_numerical': 0.010281385281385282, 'mean_word_length': 1.7284132841328412, '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': '6421045', 'n_tokens_mistral': 990, 'n_tokens_neox': 929, 'n_words': 255}