Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Should not need to change much here. The interface is built and working well
  • Loading branch information
TheUnifox committed Dec 27, 2023
1 parent 7a6be17 commit cce1d64
Show file tree
Hide file tree
Showing 11 changed files with 647 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vs/
**/bin/
**/obj/
25 changes: 25 additions & 0 deletions TECDatabaseInterface.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34309.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TECDatabaseInterface", "TECDatabaseInterface\TECDatabaseInterface.csproj", "{A67CB0BC-CA1D-42DD-8366-83FA0027DC9A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A67CB0BC-CA1D-42DD-8366-83FA0027DC9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A67CB0BC-CA1D-42DD-8366-83FA0027DC9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A67CB0BC-CA1D-42DD-8366-83FA0027DC9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A67CB0BC-CA1D-42DD-8366-83FA0027DC9A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {470301A3-5668-4380-A7A2-E65C3208EDF8}
EndGlobalSection
EndGlobal
31 changes: 31 additions & 0 deletions TECDatabaseInterface/EventModels/EventInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;

namespace TECDatabaseInterface.Models;

public partial class EventInfo
{
public int EventNumber { get; set; }

public string EventName { get; set; }

public string EventDescription { get; set; }

public int EventType { get; set; }

public bool? QuestCompatable { get; set; }

public string UserPings { get; set; }

public string EventLink { get; set; }

public int EventRating { get; set; }

public DateTime EventDate { get; set; }

public DateTime EventEnd { get; set; }

public string EventLocation { get; set; }
}
17 changes: 17 additions & 0 deletions TECDatabaseInterface/EventModels/EventsContext.Functions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;

namespace TECDatabaseInterface.Models
{

public partial class EventsContext
{
protected void OnModelCreatingGeneratedFunctions(ModelBuilder modelBuilder)
{
modelBuilder.Entity<EventInfo>().HasKey(_event => _event.EventNumber);
}
}
}
58 changes: 58 additions & 0 deletions TECDatabaseInterface/EventModels/EventsContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;

namespace TECDatabaseInterface.Models;

public partial class EventsContext : DbContext
{
public EventsContext()
{
}

public EventsContext(DbContextOptions<EventsContext> options)
: base(options)
{
}

public virtual DbSet<EventInfo> EventInfos { get; set; }

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseSqlServer(Environment.GetEnvironmentVariable("TEC_DATABASE_CONNECTION_EVENTS"));

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<EventInfo>(entity =>
{
entity.HasKey(e => e.EventNumber).HasName("PK_EventInfo_EventNumber");

entity.ToTable("EventInfo");

entity.Property(e => e.EventNumber).ValueGeneratedNever();
entity.Property(e => e.EventDescription)
.IsRequired()
.HasColumnType("ntext");
entity.Property(e => e.EventLink).HasColumnType("ntext");
entity.Property(e => e.EventName)
.IsRequired()
.HasColumnType("ntext");
entity.Property(e => e.QuestCompatable).HasDefaultValue(true);
entity.Property(e => e.UserPings).HasColumnType("ntext");
entity.Property(e => e.EventLocation)
.IsRequired()
.HasColumnType("ntext");
entity.Property(e => e.EventDate)
.IsRequired()
.HasColumnType("datetime");
entity.Property(e => e.EventEnd)
.IsRequired()
.HasColumnType("datetime");
});

OnModelCreatingPartial(modelBuilder);
}

partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
Loading

0 comments on commit cce1d64

Please sign in to comment.