mirror of
https://github.com/yawaflua/PL_JusticeBot.git
synced 2025-12-09 20:09:31 +02:00
add discord bot
change net6.0 net7.0
This commit is contained in:
18
Database/AppDbContext.cs
Normal file
18
Database/AppDbContext.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using DiscordApp.Database.Tables;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscordApp.Database
|
||||
{
|
||||
public class AppDbContext : DbContext
|
||||
{
|
||||
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }
|
||||
|
||||
public DbSet<Passport> Passport { get; set; }
|
||||
public DbSet<Autobranches> Autobranches { get; set; }
|
||||
public DbSet<Autoreactions> Autoreactions { get; set; }
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
14
Database/Tables/Autobranches.cs
Normal file
14
Database/Tables/Autobranches.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DiscordApp.Database.Tables
|
||||
{
|
||||
[Table("Autobranches", Schema = "public")]
|
||||
public class Autobranches
|
||||
{
|
||||
[Key]
|
||||
public ulong ChannelId { get; set; }
|
||||
public string BranchName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
14
Database/Tables/Autoreactions.cs
Normal file
14
Database/Tables/Autoreactions.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DiscordApp.Database.Tables
|
||||
{
|
||||
[Table("Autoreactions", Schema = "public")]
|
||||
public class Autoreactions
|
||||
{
|
||||
[Key]
|
||||
public ulong ChannelId { get; set; }
|
||||
public string EmoteId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
20
Database/Tables/Passport.cs
Normal file
20
Database/Tables/Passport.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using DiscordApp.Enums;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DiscordApp.Database.Tables
|
||||
{
|
||||
[Table("Passport", Schema = "public")]
|
||||
public class Passport
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public ulong Employee { get; set; }
|
||||
public string Applicant { get; set; }
|
||||
public long Date { get; set; }
|
||||
public Supporter Support { get; set; }
|
||||
public string Gender { get; set; }
|
||||
public string RpName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
20
Database/Tables/Patents.cs
Normal file
20
Database/Tables/Patents.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using DiscordApp.Enums;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DiscordApp.Database.Tables
|
||||
{
|
||||
[Table("Patents", Schema = "public")]
|
||||
public class Patents
|
||||
{
|
||||
public string Employee { get; set; }
|
||||
public string Applicant { get; set; }
|
||||
public int Date { get; set; }
|
||||
[Key]
|
||||
public int[] Number { get; set; }
|
||||
public Supporter Support { get; set; }
|
||||
public string Gender { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user