Добавьте файлы проекта.
This commit is contained in:
parent
7a5cc53425
commit
2a4b3481f0
25
TestApplication.sln
Normal file
25
TestApplication.sln
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.10.35004.147
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApplication", "TestApplication\TestApplication.csproj", "{56D7A700-0058-498F-A40A-63B8FAC61AA2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{56D7A700-0058-498F-A40A-63B8FAC61AA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{56D7A700-0058-498F-A40A-63B8FAC61AA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{56D7A700-0058-498F-A40A-63B8FAC61AA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{56D7A700-0058-498F-A40A-63B8FAC61AA2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0E310B41-449C-4A8E-B47D-8F859C7D9216}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
10
TestApplication/App.axaml
Normal file
10
TestApplication/App.axaml
Normal file
@ -0,0 +1,10 @@
|
||||
<Application xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="TestApplication.App"
|
||||
RequestedThemeVariant="Default">
|
||||
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||
|
||||
<Application.Styles>
|
||||
<FluentTheme />
|
||||
</Application.Styles>
|
||||
</Application>
|
24
TestApplication/App.axaml.cs
Normal file
24
TestApplication/App.axaml.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace TestApplication
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
public override void OnFrameworkInitializationCompleted()
|
||||
{
|
||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
{
|
||||
desktop.MainWindow = new MainWindowStackPanel();
|
||||
}
|
||||
|
||||
base.OnFrameworkInitializationCompleted();
|
||||
}
|
||||
}
|
||||
}
|
33
TestApplication/Context/Client.cs
Normal file
33
TestApplication/Context/Client.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Client
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Firstname { get; set; } = null!;
|
||||
|
||||
public string Lastname { get; set; } = null!;
|
||||
|
||||
public string? Patronymic { get; set; }
|
||||
|
||||
public string? Birthday { get; set; }
|
||||
|
||||
public string Registrationdate { get; set; } = null!;
|
||||
|
||||
public string? Email { get; set; }
|
||||
|
||||
public string Phone { get; set; } = null!;
|
||||
|
||||
public char Gendercode { get; set; }
|
||||
|
||||
public string? Photopath { get; set; }
|
||||
|
||||
public virtual ICollection<Clientservice> Clientservices { get; set; } = new List<Clientservice>();
|
||||
|
||||
public virtual Gender1 GendercodeNavigation { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<Tag1> Tags { get; set; } = new List<Tag1>();
|
||||
}
|
33
TestApplication/Context/Client1.cs
Normal file
33
TestApplication/Context/Client1.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Client1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string FirstName { get; set; } = null!;
|
||||
|
||||
public string LastName { get; set; } = null!;
|
||||
|
||||
public string? Patronymic { get; set; }
|
||||
|
||||
public DateOnly? Birthday { get; set; }
|
||||
|
||||
public DateTime RegistrationDate { get; set; }
|
||||
|
||||
public string? Email { get; set; }
|
||||
|
||||
public string Phone { get; set; } = null!;
|
||||
|
||||
public char GenderCode { get; set; }
|
||||
|
||||
public string? PhotoPath { get; set; }
|
||||
|
||||
public virtual ICollection<ClientService1> ClientService1s { get; set; } = new List<ClientService1>();
|
||||
|
||||
public virtual Gender GenderCodeNavigation { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<Tag> Tags { get; set; } = new List<Tag>();
|
||||
}
|
25
TestApplication/Context/ClientService1.cs
Normal file
25
TestApplication/Context/ClientService1.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class ClientService1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int ClientId { get; set; }
|
||||
|
||||
public int ServiceId { get; set; }
|
||||
|
||||
public DateTime StartTime { get; set; }
|
||||
|
||||
public string? Comment { get; set; }
|
||||
|
||||
public virtual Client1 Client { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<DocumentByService> DocumentByServices { get; set; } = new List<DocumentByService>();
|
||||
|
||||
public virtual ICollection<ProductSale1> ProductSale1s { get; set; } = new List<ProductSale1>();
|
||||
|
||||
public virtual Service Service { get; set; } = null!;
|
||||
}
|
25
TestApplication/Context/Clientservice.cs
Normal file
25
TestApplication/Context/Clientservice.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Clientservice
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int Clientid { get; set; }
|
||||
|
||||
public int Serviceid { get; set; }
|
||||
|
||||
public DateTime Starttime { get; set; }
|
||||
|
||||
public string? Comment { get; set; }
|
||||
|
||||
public virtual Client Client { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<Documentbyservice1> Documentbyservice1s { get; set; } = new List<Documentbyservice1>();
|
||||
|
||||
public virtual ICollection<Productsale> Productsales { get; set; } = new List<Productsale>();
|
||||
|
||||
public virtual Service1 Service { get; set; } = null!;
|
||||
}
|
15
TestApplication/Context/DocumentByService.cs
Normal file
15
TestApplication/Context/DocumentByService.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class DocumentByService
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int ClientServiceId { get; set; }
|
||||
|
||||
public string DocumentPath { get; set; } = null!;
|
||||
|
||||
public virtual ClientService1 ClientService { get; set; } = null!;
|
||||
}
|
15
TestApplication/Context/Documentbyservice1.cs
Normal file
15
TestApplication/Context/Documentbyservice1.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Documentbyservice1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int Clientserviceid { get; set; }
|
||||
|
||||
public string Documentpath { get; set; } = null!;
|
||||
|
||||
public virtual Clientservice Clientservice { get; set; } = null!;
|
||||
}
|
13
TestApplication/Context/Gender.cs
Normal file
13
TestApplication/Context/Gender.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Gender
|
||||
{
|
||||
public char Code { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public virtual ICollection<Client1> Client1s { get; set; } = new List<Client1>();
|
||||
}
|
13
TestApplication/Context/Gender1.cs
Normal file
13
TestApplication/Context/Gender1.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Gender1
|
||||
{
|
||||
public char Code { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public virtual ICollection<Client> Clients { get; set; } = new List<Client>();
|
||||
}
|
15
TestApplication/Context/Manufacturer.cs
Normal file
15
TestApplication/Context/Manufacturer.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Manufacturer
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
public DateOnly? Startdate { get; set; }
|
||||
|
||||
public virtual ICollection<Product> Products { get; set; } = new List<Product>();
|
||||
}
|
15
TestApplication/Context/Manufacturer1.cs
Normal file
15
TestApplication/Context/Manufacturer1.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Manufacturer1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
public DateOnly? StartDate { get; set; }
|
||||
|
||||
public virtual ICollection<Product1> Product1s { get; set; } = new List<Product1>();
|
||||
}
|
31
TestApplication/Context/Product.cs
Normal file
31
TestApplication/Context/Product.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Product
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Title { get; set; } = null!;
|
||||
|
||||
public decimal Cost { get; set; }
|
||||
|
||||
public string? Description { get; set; }
|
||||
|
||||
public string? Mainimagepath { get; set; }
|
||||
|
||||
public bool Isactive { get; set; }
|
||||
|
||||
public int? Manufacturerid { get; set; }
|
||||
|
||||
public virtual Manufacturer? Manufacturer { get; set; }
|
||||
|
||||
public virtual ICollection<Productphoto> Productphotos { get; set; } = new List<Productphoto>();
|
||||
|
||||
public virtual ICollection<Productsale> Productsales { get; set; } = new List<Productsale>();
|
||||
|
||||
public virtual ICollection<Product> Attachedproducts { get; set; } = new List<Product>();
|
||||
|
||||
public virtual ICollection<Product> Mainproducts { get; set; } = new List<Product>();
|
||||
}
|
31
TestApplication/Context/Product1.cs
Normal file
31
TestApplication/Context/Product1.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Product1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Title { get; set; } = null!;
|
||||
|
||||
public decimal Cost { get; set; }
|
||||
|
||||
public string? Description { get; set; }
|
||||
|
||||
public string? MainImagePath { get; set; }
|
||||
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
public int? ManufacturerId { get; set; }
|
||||
|
||||
public virtual Manufacturer1? Manufacturer { get; set; }
|
||||
|
||||
public virtual ICollection<ProductPhoto1> ProductPhoto1s { get; set; } = new List<ProductPhoto1>();
|
||||
|
||||
public virtual ICollection<ProductSale1> ProductSale1s { get; set; } = new List<ProductSale1>();
|
||||
|
||||
public virtual ICollection<Product1> AttachedProducts { get; set; } = new List<Product1>();
|
||||
|
||||
public virtual ICollection<Product1> MainProducts { get; set; } = new List<Product1>();
|
||||
}
|
15
TestApplication/Context/ProductPhoto1.cs
Normal file
15
TestApplication/Context/ProductPhoto1.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class ProductPhoto1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int ProductId { get; set; }
|
||||
|
||||
public string PhotoPath { get; set; } = null!;
|
||||
|
||||
public virtual Product1 Product { get; set; } = null!;
|
||||
}
|
21
TestApplication/Context/ProductSale1.cs
Normal file
21
TestApplication/Context/ProductSale1.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class ProductSale1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public DateTime SaleDate { get; set; }
|
||||
|
||||
public int ProductId { get; set; }
|
||||
|
||||
public int Quantity { get; set; }
|
||||
|
||||
public int? ClientServiceId { get; set; }
|
||||
|
||||
public virtual ClientService1? ClientService { get; set; }
|
||||
|
||||
public virtual Product1 Product { get; set; } = null!;
|
||||
}
|
15
TestApplication/Context/Productphoto.cs
Normal file
15
TestApplication/Context/Productphoto.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Productphoto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int Productid { get; set; }
|
||||
|
||||
public string Photopath { get; set; } = null!;
|
||||
|
||||
public virtual Product Product { get; set; } = null!;
|
||||
}
|
21
TestApplication/Context/Productsale.cs
Normal file
21
TestApplication/Context/Productsale.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Productsale
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Saledate { get; set; } = null!;
|
||||
|
||||
public int Productid { get; set; }
|
||||
|
||||
public int Quantity { get; set; }
|
||||
|
||||
public int? Clientserviceid { get; set; }
|
||||
|
||||
public virtual Clientservice? Clientservice { get; set; }
|
||||
|
||||
public virtual Product Product { get; set; } = null!;
|
||||
}
|
25
TestApplication/Context/Service.cs
Normal file
25
TestApplication/Context/Service.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Service
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Title { get; set; } = null!;
|
||||
|
||||
public decimal Cost { get; set; }
|
||||
|
||||
public int DurationInSeconds { get; set; }
|
||||
|
||||
public string? Description { get; set; }
|
||||
|
||||
public double? Discount { get; set; }
|
||||
|
||||
public string? MainImagePath { get; set; }
|
||||
|
||||
public virtual ICollection<ClientService1> ClientService1s { get; set; } = new List<ClientService1>();
|
||||
|
||||
public virtual ICollection<ServicePhoto> ServicePhotos { get; set; } = new List<ServicePhoto>();
|
||||
}
|
25
TestApplication/Context/Service1.cs
Normal file
25
TestApplication/Context/Service1.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Service1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Title { get; set; } = null!;
|
||||
|
||||
public decimal Cost { get; set; }
|
||||
|
||||
public int Durationinseconds { get; set; }
|
||||
|
||||
public string? Description { get; set; }
|
||||
|
||||
public decimal? Discount { get; set; }
|
||||
|
||||
public string? Mainimagepath { get; set; }
|
||||
|
||||
public virtual ICollection<Clientservice> Clientservices { get; set; } = new List<Clientservice>();
|
||||
|
||||
public virtual ICollection<Servicephoto1> Servicephoto1s { get; set; } = new List<Servicephoto1>();
|
||||
}
|
15
TestApplication/Context/ServicePhoto.cs
Normal file
15
TestApplication/Context/ServicePhoto.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class ServicePhoto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int ServiceId { get; set; }
|
||||
|
||||
public string PhotoPath { get; set; } = null!;
|
||||
|
||||
public virtual Service Service { get; set; } = null!;
|
||||
}
|
15
TestApplication/Context/Servicephoto1.cs
Normal file
15
TestApplication/Context/Servicephoto1.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Servicephoto1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int Serviceid { get; set; }
|
||||
|
||||
public string Photopath { get; set; } = null!;
|
||||
|
||||
public virtual Service1 Service { get; set; } = null!;
|
||||
}
|
15
TestApplication/Context/Tag.cs
Normal file
15
TestApplication/Context/Tag.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Tag
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Title { get; set; } = null!;
|
||||
|
||||
public string Color { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<Client1> Clients { get; set; } = new List<Client1>();
|
||||
}
|
15
TestApplication/Context/Tag1.cs
Normal file
15
TestApplication/Context/Tag1.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class Tag1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Title { get; set; } = null!;
|
||||
|
||||
public string Color { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<Client> Clients { get; set; } = new List<Client>();
|
||||
}
|
594
TestApplication/Context/TyutyunnikovaContext.cs
Normal file
594
TestApplication/Context/TyutyunnikovaContext.cs
Normal file
@ -0,0 +1,594 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace TestApplication.Context;
|
||||
|
||||
public partial class TyutyunnikovaContext : DbContext
|
||||
{
|
||||
public TyutyunnikovaContext()
|
||||
{
|
||||
}
|
||||
|
||||
public TyutyunnikovaContext(DbContextOptions<TyutyunnikovaContext> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual DbSet<Client> Clients { get; set; }
|
||||
|
||||
public virtual DbSet<Client1> Clients1 { get; set; }
|
||||
|
||||
public virtual DbSet<ClientService1> ClientServices1 { get; set; }
|
||||
|
||||
public virtual DbSet<Clientservice> Clientservices { get; set; }
|
||||
|
||||
public virtual DbSet<DocumentByService> DocumentByServices { get; set; }
|
||||
|
||||
public virtual DbSet<Documentbyservice1> Documentbyservices1 { get; set; }
|
||||
|
||||
public virtual DbSet<Gender> Genders { get; set; }
|
||||
|
||||
public virtual DbSet<Gender1> Genders1 { get; set; }
|
||||
|
||||
public virtual DbSet<Manufacturer> Manufacturers { get; set; }
|
||||
|
||||
public virtual DbSet<Manufacturer1> Manufacturers1 { get; set; }
|
||||
|
||||
public virtual DbSet<Product> Products { get; set; }
|
||||
|
||||
public virtual DbSet<Product1> Products1 { get; set; }
|
||||
|
||||
public virtual DbSet<ProductPhoto1> ProductPhotos1 { get; set; }
|
||||
|
||||
public virtual DbSet<ProductSale1> ProductSales1 { get; set; }
|
||||
|
||||
public virtual DbSet<Productphoto> Productphotos { get; set; }
|
||||
|
||||
public virtual DbSet<Productsale> Productsales { get; set; }
|
||||
|
||||
public virtual DbSet<Service> Services { get; set; }
|
||||
|
||||
public virtual DbSet<Service1> Services1 { get; set; }
|
||||
|
||||
public virtual DbSet<ServicePhoto> ServicePhotos { get; set; }
|
||||
|
||||
public virtual DbSet<Servicephoto1> Servicephotos1 { get; set; }
|
||||
|
||||
public virtual DbSet<Tag> Tags { get; set; }
|
||||
|
||||
public virtual DbSet<Tag1> Tags1 { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263.
|
||||
=> optionsBuilder.UseNpgsql("Host=45.67.56.214;Port=5454;Database=tyutyunnikova;Username=tyutyunnikova;password=weGk7YzI");
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<Client>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("client_pkey");
|
||||
|
||||
entity.ToTable("client");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Birthday)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("birthday");
|
||||
entity.Property(e => e.Email)
|
||||
.HasMaxLength(255)
|
||||
.HasColumnName("email");
|
||||
entity.Property(e => e.Firstname)
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("firstname");
|
||||
entity.Property(e => e.Gendercode)
|
||||
.HasMaxLength(1)
|
||||
.HasColumnName("gendercode");
|
||||
entity.Property(e => e.Lastname)
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("lastname");
|
||||
entity.Property(e => e.Patronymic)
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("patronymic");
|
||||
entity.Property(e => e.Phone)
|
||||
.HasMaxLength(20)
|
||||
.HasColumnName("phone");
|
||||
entity.Property(e => e.Photopath)
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnName("photopath");
|
||||
entity.Property(e => e.Registrationdate)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("registrationdate");
|
||||
|
||||
entity.HasOne(d => d.GendercodeNavigation).WithMany(p => p.Clients)
|
||||
.HasForeignKey(d => d.Gendercode)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("client_gendercode_fkey");
|
||||
|
||||
entity.HasMany(d => d.Tags).WithMany(p => p.Clients)
|
||||
.UsingEntity<Dictionary<string, object>>(
|
||||
"Tagofclient",
|
||||
r => r.HasOne<Tag1>().WithMany()
|
||||
.HasForeignKey("Tagid")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("tagofclient_tagid_fkey"),
|
||||
l => l.HasOne<Client>().WithMany()
|
||||
.HasForeignKey("Clientid")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("tagofclient_clientid_fkey"),
|
||||
j =>
|
||||
{
|
||||
j.HasKey("Clientid", "Tagid").HasName("tagofclient_pk");
|
||||
j.ToTable("tagofclient");
|
||||
j.IndexerProperty<int>("Clientid").HasColumnName("clientid");
|
||||
j.IndexerProperty<int>("Tagid").HasColumnName("tagid");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Client1>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("Client_pkey");
|
||||
|
||||
entity.ToTable("Client", "Clients");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.Email).HasMaxLength(255);
|
||||
entity.Property(e => e.FirstName).HasMaxLength(50);
|
||||
entity.Property(e => e.GenderCode).HasMaxLength(1);
|
||||
entity.Property(e => e.LastName).HasMaxLength(50);
|
||||
entity.Property(e => e.Patronymic).HasMaxLength(50);
|
||||
entity.Property(e => e.Phone).HasMaxLength(20);
|
||||
entity.Property(e => e.PhotoPath).HasMaxLength(1000);
|
||||
|
||||
entity.HasOne(d => d.GenderCodeNavigation).WithMany(p => p.Client1s)
|
||||
.HasForeignKey(d => d.GenderCode)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_Client_Gender");
|
||||
|
||||
entity.HasMany(d => d.Tags).WithMany(p => p.Clients)
|
||||
.UsingEntity<Dictionary<string, object>>(
|
||||
"TagOfClient1",
|
||||
r => r.HasOne<Tag>().WithMany()
|
||||
.HasForeignKey("TagId")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_TagOfClient_Tag"),
|
||||
l => l.HasOne<Client1>().WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_TagOfClient_Client"),
|
||||
j =>
|
||||
{
|
||||
j.HasKey("ClientId", "TagId").HasName("TagOfClient_pkey");
|
||||
j.ToTable("TagOfClient", "Clients");
|
||||
j.IndexerProperty<int>("ClientId").HasColumnName("ClientID");
|
||||
j.IndexerProperty<int>("TagId").HasColumnName("TagID");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ClientService1>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("ClientService_pkey");
|
||||
|
||||
entity.ToTable("ClientService", "Clients");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.ClientId).HasColumnName("ClientID");
|
||||
entity.Property(e => e.ServiceId).HasColumnName("ServiceID");
|
||||
|
||||
entity.HasOne(d => d.Client).WithMany(p => p.ClientService1s)
|
||||
.HasForeignKey(d => d.ClientId)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_ClientService_Client");
|
||||
|
||||
entity.HasOne(d => d.Service).WithMany(p => p.ClientService1s)
|
||||
.HasForeignKey(d => d.ServiceId)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_ClientService_Service");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Clientservice>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("clientservice_pkey");
|
||||
|
||||
entity.ToTable("clientservice");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Clientid).HasColumnName("clientid");
|
||||
entity.Property(e => e.Comment).HasColumnName("comment");
|
||||
entity.Property(e => e.Serviceid).HasColumnName("serviceid");
|
||||
entity.Property(e => e.Starttime)
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("starttime");
|
||||
|
||||
entity.HasOne(d => d.Client).WithMany(p => p.Clientservices)
|
||||
.HasForeignKey(d => d.Clientid)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("clientservice_clientid_fkey");
|
||||
|
||||
entity.HasOne(d => d.Service).WithMany(p => p.Clientservices)
|
||||
.HasForeignKey(d => d.Serviceid)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("clientservice_serviceid_fkey");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<DocumentByService>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("DocumentByService_pkey");
|
||||
|
||||
entity.ToTable("DocumentByService", "Clients");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.ClientServiceId).HasColumnName("ClientServiceID");
|
||||
entity.Property(e => e.DocumentPath).HasMaxLength(1000);
|
||||
|
||||
entity.HasOne(d => d.ClientService).WithMany(p => p.DocumentByServices)
|
||||
.HasForeignKey(d => d.ClientServiceId)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_DocumentByService_ClientService");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Documentbyservice1>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("documentbyservice_pkey");
|
||||
|
||||
entity.ToTable("documentbyservice");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Clientserviceid).HasColumnName("clientserviceid");
|
||||
entity.Property(e => e.Documentpath)
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnName("documentpath");
|
||||
|
||||
entity.HasOne(d => d.Clientservice).WithMany(p => p.Documentbyservice1s)
|
||||
.HasForeignKey(d => d.Clientserviceid)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("documentbyservice_clientserviceid_fkey");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Gender>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Code).HasName("Gender_pkey");
|
||||
|
||||
entity.ToTable("Gender", "Clients");
|
||||
|
||||
entity.Property(e => e.Code)
|
||||
.HasMaxLength(1)
|
||||
.ValueGeneratedNever();
|
||||
entity.Property(e => e.Name).HasMaxLength(10);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Gender1>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Code).HasName("gender_pkey");
|
||||
|
||||
entity.ToTable("gender");
|
||||
|
||||
entity.Property(e => e.Code)
|
||||
.HasMaxLength(1)
|
||||
.ValueGeneratedNever()
|
||||
.HasColumnName("code");
|
||||
entity.Property(e => e.Name)
|
||||
.HasMaxLength(10)
|
||||
.HasColumnName("name");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Manufacturer>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("manufacturer_pkey");
|
||||
|
||||
entity.ToTable("manufacturer");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Name)
|
||||
.HasMaxLength(100)
|
||||
.HasColumnName("name");
|
||||
entity.Property(e => e.Startdate).HasColumnName("startdate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Manufacturer1>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("Manufacturer_pkey");
|
||||
|
||||
entity.ToTable("Manufacturer", "Clients");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.Name).HasMaxLength(100);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Product>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("product_pkey");
|
||||
|
||||
entity.ToTable("product");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Cost)
|
||||
.HasPrecision(19, 4)
|
||||
.HasColumnName("cost");
|
||||
entity.Property(e => e.Description).HasColumnName("description");
|
||||
entity.Property(e => e.Isactive).HasColumnName("isactive");
|
||||
entity.Property(e => e.Mainimagepath)
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnName("mainimagepath");
|
||||
entity.Property(e => e.Manufacturerid).HasColumnName("manufacturerid");
|
||||
entity.Property(e => e.Title)
|
||||
.HasMaxLength(100)
|
||||
.HasColumnName("title");
|
||||
|
||||
entity.HasOne(d => d.Manufacturer).WithMany(p => p.Products)
|
||||
.HasForeignKey(d => d.Manufacturerid)
|
||||
.HasConstraintName("product_manufacturerid_fkey");
|
||||
|
||||
entity.HasMany(d => d.Attachedproducts).WithMany(p => p.Mainproducts)
|
||||
.UsingEntity<Dictionary<string, object>>(
|
||||
"Attachedproduct1",
|
||||
r => r.HasOne<Product>().WithMany()
|
||||
.HasForeignKey("Attachedproductid")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("attachedproduct_attachedproductid_fkey"),
|
||||
l => l.HasOne<Product>().WithMany()
|
||||
.HasForeignKey("Mainproductid")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("attachedproduct_mainproductid_fkey"),
|
||||
j =>
|
||||
{
|
||||
j.HasKey("Mainproductid", "Attachedproductid").HasName("attachedproduct_pk");
|
||||
j.ToTable("attachedproduct");
|
||||
j.IndexerProperty<int>("Mainproductid").HasColumnName("mainproductid");
|
||||
j.IndexerProperty<int>("Attachedproductid").HasColumnName("attachedproductid");
|
||||
});
|
||||
|
||||
entity.HasMany(d => d.Mainproducts).WithMany(p => p.Attachedproducts)
|
||||
.UsingEntity<Dictionary<string, object>>(
|
||||
"Attachedproduct1",
|
||||
r => r.HasOne<Product>().WithMany()
|
||||
.HasForeignKey("Mainproductid")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("attachedproduct_mainproductid_fkey"),
|
||||
l => l.HasOne<Product>().WithMany()
|
||||
.HasForeignKey("Attachedproductid")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("attachedproduct_attachedproductid_fkey"),
|
||||
j =>
|
||||
{
|
||||
j.HasKey("Mainproductid", "Attachedproductid").HasName("attachedproduct_pk");
|
||||
j.ToTable("attachedproduct");
|
||||
j.IndexerProperty<int>("Mainproductid").HasColumnName("mainproductid");
|
||||
j.IndexerProperty<int>("Attachedproductid").HasColumnName("attachedproductid");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Product1>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("Product_pkey");
|
||||
|
||||
entity.ToTable("Product", "Clients");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.Cost).HasPrecision(19, 4);
|
||||
entity.Property(e => e.MainImagePath).HasMaxLength(1000);
|
||||
entity.Property(e => e.ManufacturerId).HasColumnName("ManufacturerID");
|
||||
entity.Property(e => e.Title).HasMaxLength(100);
|
||||
|
||||
entity.HasOne(d => d.Manufacturer).WithMany(p => p.Product1s)
|
||||
.HasForeignKey(d => d.ManufacturerId)
|
||||
.HasConstraintName("FK_Product_Manufacturer");
|
||||
|
||||
entity.HasMany(d => d.AttachedProducts).WithMany(p => p.MainProducts)
|
||||
.UsingEntity<Dictionary<string, object>>(
|
||||
"AttachedProduct",
|
||||
r => r.HasOne<Product1>().WithMany()
|
||||
.HasForeignKey("AttachedProductId")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_AttachedProduct_Product1"),
|
||||
l => l.HasOne<Product1>().WithMany()
|
||||
.HasForeignKey("MainProductId")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_AttachedProduct_Product"),
|
||||
j =>
|
||||
{
|
||||
j.HasKey("MainProductId", "AttachedProductId").HasName("AttachedProduct_pkey");
|
||||
j.ToTable("AttachedProduct", "Clients");
|
||||
j.IndexerProperty<int>("MainProductId").HasColumnName("MainProductID");
|
||||
j.IndexerProperty<int>("AttachedProductId").HasColumnName("AttachedProductID");
|
||||
});
|
||||
|
||||
entity.HasMany(d => d.MainProducts).WithMany(p => p.AttachedProducts)
|
||||
.UsingEntity<Dictionary<string, object>>(
|
||||
"AttachedProduct",
|
||||
r => r.HasOne<Product1>().WithMany()
|
||||
.HasForeignKey("MainProductId")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_AttachedProduct_Product"),
|
||||
l => l.HasOne<Product1>().WithMany()
|
||||
.HasForeignKey("AttachedProductId")
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_AttachedProduct_Product1"),
|
||||
j =>
|
||||
{
|
||||
j.HasKey("MainProductId", "AttachedProductId").HasName("AttachedProduct_pkey");
|
||||
j.ToTable("AttachedProduct", "Clients");
|
||||
j.IndexerProperty<int>("MainProductId").HasColumnName("MainProductID");
|
||||
j.IndexerProperty<int>("AttachedProductId").HasColumnName("AttachedProductID");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ProductPhoto1>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("ProductPhoto_pkey");
|
||||
|
||||
entity.ToTable("ProductPhoto", "Clients");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.PhotoPath).HasMaxLength(1000);
|
||||
entity.Property(e => e.ProductId).HasColumnName("ProductID");
|
||||
|
||||
entity.HasOne(d => d.Product).WithMany(p => p.ProductPhoto1s)
|
||||
.HasForeignKey(d => d.ProductId)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_ProductPhoto_Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ProductSale1>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("ProductSale_pkey");
|
||||
|
||||
entity.ToTable("ProductSale", "Clients");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.ClientServiceId).HasColumnName("ClientServiceID");
|
||||
entity.Property(e => e.ProductId).HasColumnName("ProductID");
|
||||
|
||||
entity.HasOne(d => d.ClientService).WithMany(p => p.ProductSale1s)
|
||||
.HasForeignKey(d => d.ClientServiceId)
|
||||
.HasConstraintName("FK_ProductSale_ClientService");
|
||||
|
||||
entity.HasOne(d => d.Product).WithMany(p => p.ProductSale1s)
|
||||
.HasForeignKey(d => d.ProductId)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_ProductSale_Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Productphoto>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("productphoto_pkey");
|
||||
|
||||
entity.ToTable("productphoto");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Photopath)
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnName("photopath");
|
||||
entity.Property(e => e.Productid).HasColumnName("productid");
|
||||
|
||||
entity.HasOne(d => d.Product).WithMany(p => p.Productphotos)
|
||||
.HasForeignKey(d => d.Productid)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("productphoto_productid_fkey");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Productsale>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("productsale_pkey");
|
||||
|
||||
entity.ToTable("productsale");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Clientserviceid).HasColumnName("clientserviceid");
|
||||
entity.Property(e => e.Productid).HasColumnName("productid");
|
||||
entity.Property(e => e.Quantity).HasColumnName("quantity");
|
||||
entity.Property(e => e.Saledate)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("saledate");
|
||||
|
||||
entity.HasOne(d => d.Clientservice).WithMany(p => p.Productsales)
|
||||
.HasForeignKey(d => d.Clientserviceid)
|
||||
.HasConstraintName("productsale_clientserviceid_fkey");
|
||||
|
||||
entity.HasOne(d => d.Product).WithMany(p => p.Productsales)
|
||||
.HasForeignKey(d => d.Productid)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("productsale_productid_fkey");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Service>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("Service_pkey");
|
||||
|
||||
entity.ToTable("Service", "Clients");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.Cost).HasPrecision(19, 4);
|
||||
entity.Property(e => e.MainImagePath).HasMaxLength(1000);
|
||||
entity.Property(e => e.Title).HasMaxLength(100);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Service1>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("service_pkey");
|
||||
|
||||
entity.ToTable("service");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Cost)
|
||||
.HasPrecision(19, 4)
|
||||
.HasColumnName("cost");
|
||||
entity.Property(e => e.Description).HasColumnName("description");
|
||||
entity.Property(e => e.Discount).HasColumnName("discount");
|
||||
entity.Property(e => e.Durationinseconds).HasColumnName("durationinseconds");
|
||||
entity.Property(e => e.Mainimagepath)
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnName("mainimagepath");
|
||||
entity.Property(e => e.Title)
|
||||
.HasMaxLength(100)
|
||||
.HasColumnName("title");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ServicePhoto>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("ServicePhoto_pkey");
|
||||
|
||||
entity.ToTable("ServicePhoto", "Clients");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.PhotoPath).HasMaxLength(1000);
|
||||
entity.Property(e => e.ServiceId).HasColumnName("ServiceID");
|
||||
|
||||
entity.HasOne(d => d.Service).WithMany(p => p.ServicePhotos)
|
||||
.HasForeignKey(d => d.ServiceId)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("FK_ServicePhoto_Service");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Servicephoto1>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("servicephoto_pkey");
|
||||
|
||||
entity.ToTable("servicephoto");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Photopath)
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnName("photopath");
|
||||
entity.Property(e => e.Serviceid).HasColumnName("serviceid");
|
||||
|
||||
entity.HasOne(d => d.Service).WithMany(p => p.Servicephoto1s)
|
||||
.HasForeignKey(d => d.Serviceid)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("servicephoto_serviceid_fkey");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Tag>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("Tag_pkey");
|
||||
|
||||
entity.ToTable("Tag", "Clients");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("ID");
|
||||
entity.Property(e => e.Color)
|
||||
.HasMaxLength(6)
|
||||
.IsFixedLength();
|
||||
entity.Property(e => e.Title).HasMaxLength(30);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Tag1>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("tag_pkey");
|
||||
|
||||
entity.ToTable("tag");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Color)
|
||||
.HasMaxLength(6)
|
||||
.IsFixedLength()
|
||||
.HasColumnName("color");
|
||||
entity.Property(e => e.Title)
|
||||
.HasMaxLength(30)
|
||||
.HasColumnName("title");
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||
}
|
50
TestApplication/MainWindowDockPanel.axaml
Normal file
50
TestApplication/MainWindowDockPanel.axaml
Normal file
@ -0,0 +1,50 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="TestApplication.MainWindowDockPanel"
|
||||
Title="TestApplication">
|
||||
<DockPanel>
|
||||
<StackPanel
|
||||
Name="TopBar"
|
||||
Height="40"
|
||||
Background="Aqua"
|
||||
DockPanel.Dock="Top">
|
||||
<TextBlock HorizontalAlignment="Center" FontFamily="">
|
||||
Топ бар
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Name="BottomBar"
|
||||
Height="40"
|
||||
Background="Bisque"
|
||||
DockPanel.Dock="Bottom">
|
||||
<TextBlock HorizontalAlignment="Center">
|
||||
Ботом бар
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Name="LeftBar"
|
||||
Width="100"
|
||||
Background="Purple"
|
||||
DockPanel.Dock="Left">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
Лефт бар
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Name="RightBar"
|
||||
Width="100"
|
||||
Background="Green"
|
||||
DockPanel.Dock="Right">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
Райт бар
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Name="Content"
|
||||
Background="White"/>
|
||||
</DockPanel>
|
||||
</Window>
|
12
TestApplication/MainWindowDockPanel.axaml.cs
Normal file
12
TestApplication/MainWindowDockPanel.axaml.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace TestApplication
|
||||
{
|
||||
public partial class MainWindowDockPanel : Window
|
||||
{
|
||||
public MainWindowDockPanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
40
TestApplication/MainWindowGrid.axaml
Normal file
40
TestApplication/MainWindowGrid.axaml
Normal file
@ -0,0 +1,40 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="TestApplication.MainWindowGrid"
|
||||
Title="MainWindowGrid">
|
||||
<Grid RowDefinitions="40, * ,40" ColumnDefinitions="100, * , 100" ShowGridLines="True" Background="White">
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Name="TopBar"
|
||||
Background="Aqua"/>
|
||||
<StackPanel
|
||||
Name="BottomBar"
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Background="Bisque"
|
||||
DockPanel.Dock="Bottom"/>
|
||||
<StackPanel
|
||||
Name="LeftBar"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Background="Purple"
|
||||
DockPanel.Dock="Left"/>
|
||||
<StackPanel
|
||||
Name="RightBar"
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Background="Green"
|
||||
DockPanel.Dock="Right"/>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Name="Content"
|
||||
Background="White"/>
|
||||
</Grid>
|
||||
</Window>
|
13
TestApplication/MainWindowGrid.axaml.cs
Normal file
13
TestApplication/MainWindowGrid.axaml.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace TestApplication;
|
||||
|
||||
public partial class MainWindowGrid : Window
|
||||
{
|
||||
public MainWindowGrid()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
27
TestApplication/MainWindowStackPanel.axaml
Normal file
27
TestApplication/MainWindowStackPanel.axaml
Normal file
@ -0,0 +1,27 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="TestApplication.MainWindowStackPanel"
|
||||
Title="MainWindowStackPanel">
|
||||
<DockPanel>
|
||||
<StackPanel
|
||||
Background="Orange"
|
||||
Orientation="Horizontal"
|
||||
DockPanel.Dock="Top">
|
||||
<ComboBox/>
|
||||
<ComboBox/>
|
||||
<ComboBox/>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Background="Yellow"
|
||||
Orientation="Vertical">
|
||||
<RadioButton/>
|
||||
<RadioButton/>
|
||||
<RadioButton/>
|
||||
<RadioButton/>
|
||||
<RadioButton/>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Window>
|
13
TestApplication/MainWindowStackPanel.axaml.cs
Normal file
13
TestApplication/MainWindowStackPanel.axaml.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace TestApplication;
|
||||
|
||||
public partial class MainWindowStackPanel : Window
|
||||
{
|
||||
public MainWindowStackPanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
22
TestApplication/Program.cs
Normal file
22
TestApplication/Program.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using Avalonia;
|
||||
using System;
|
||||
|
||||
namespace TestApplication
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
// Initialization code. Don't use any Avalonia, third-party APIs or any
|
||||
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
|
||||
// yet and stuff might break.
|
||||
[STAThread]
|
||||
public static void Main(string[] args) => BuildAvaloniaApp()
|
||||
.StartWithClassicDesktopLifetime(args);
|
||||
|
||||
// Avalonia configuration, don't remove; also used by visual designer.
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.WithInterFont()
|
||||
.LogToTrace();
|
||||
}
|
||||
}
|
34
TestApplication/TestApplication.csproj
Normal file
34
TestApplication/TestApplication.csproj
Normal file
@ -0,0 +1,34 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.1.3" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.1.3" />
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.3" />
|
||||
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.1.3" />
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="MainWindowDockPanel.axaml.cs">
|
||||
<DependentUpon>MainWindowDockPanel.axaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="MainWindowStackPanel.axaml.cs">
|
||||
<DependentUpon>MainWindowStackPanel.axaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
18
TestApplication/app.manifest
Normal file
18
TestApplication/app.manifest
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<!-- This manifest is used on Windows only.
|
||||
Don't remove it as it might cause problems with window transparency and embedded controls.
|
||||
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
|
||||
<assemblyIdentity version="1.0.0.0" name="TestApplication.Desktop"/>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- A list of the Windows versions that this application has been tested on
|
||||
and is designed to work with. Uncomment the appropriate elements
|
||||
and Windows will automatically select the most compatible environment. -->
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
Loading…
Reference in New Issue
Block a user