mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2026-02-05 11:24:13 +02:00
make backend for my site
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using yaflay.ru.Database.Tables;
|
||||
using yaflay.ru.Models.Tables;
|
||||
using api.yawaflua.ru.Models.Tables;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using yawaflua.ru.Database.Tables;
|
||||
using yawaflua.ru.Models.Tables;
|
||||
|
||||
namespace yaflay.ru.Models
|
||||
namespace yawaflua.ru.Models
|
||||
{
|
||||
public class AppDbContext : DbContext
|
||||
{
|
||||
@@ -15,6 +16,7 @@ namespace yaflay.ru.Models
|
||||
public DbSet<Comments> Comments { get; set; }
|
||||
public DbSet<Redirects> Redirects { get; set; }
|
||||
public DbSet<ApiKey> ApiKeys { get; set; }
|
||||
public DbSet<Projects> Projects { get; set; }
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
@@ -4,9 +4,9 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using yaflay.ru.Auth;
|
||||
using yawaflua.ru.Auth;
|
||||
|
||||
namespace yaflay.ru.Database.Tables;
|
||||
namespace yawaflua.ru.Database.Tables;
|
||||
|
||||
[Table("ApiKeys", Schema = "public")]
|
||||
public class ApiKey
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace yaflay.ru.Models.Tables
|
||||
namespace yawaflua.ru.Models.Tables
|
||||
{
|
||||
[Table("Blogs", Schema = "public")]
|
||||
public class Blogs
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Net.Mail;
|
||||
|
||||
namespace yaflay.ru.Models.Tables
|
||||
namespace yawaflua.ru.Models.Tables
|
||||
{
|
||||
[Table("Comments", Schema = "public")]
|
||||
public class Comments
|
||||
|
||||
16
Models/Tables/Projects.cs
Normal file
16
Models/Tables/Projects.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace api.yawaflua.ru.Models.Tables
|
||||
{
|
||||
[Table("Projects")]
|
||||
public class Projects
|
||||
{
|
||||
[Key]
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string description { get; set; }
|
||||
public string url { get; set; }
|
||||
public string image { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace yaflay.ru.Models.Tables
|
||||
namespace yawaflua.ru.Models.Tables
|
||||
{
|
||||
public class Redirects
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user