init commit
This commit is contained in:
parent
c91804fd96
commit
c722f8dca4
4
FunctionWindow.axaml
Executable file → Normal file
4
FunctionWindow.axaml
Executable file → Normal file
@ -9,7 +9,7 @@
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center" Orientation="Horizontal" >
|
||||
<StackPanel>
|
||||
<Image Source="{Binding Image}" Width="100" Height="100" Margin="5" HorizontalAlignment="Center"/>
|
||||
<Image Source="{Binding Image}" Width="100" Height="100" Margin="5" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock x:Name="Fio">
|
||||
@ -25,4 +25,4 @@
|
||||
<Button Content="Далее" Click="Next_Function_Button"/>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Window>
|
||||
</Window>
|
0
FunctionWindow.axaml.cs
Executable file → Normal file
0
FunctionWindow.axaml.cs
Executable file → Normal file
@ -3,6 +3,7 @@ using System.Linq;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using demo_hard.Models;
|
||||
//using demo_hard.Models;
|
||||
using Tmds.DBus.Protocol;
|
||||
|
||||
namespace demo_hard;
|
||||
|
23
Models/Client.cs
Normal file
23
Models/Client.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace demo_hard.Models;
|
||||
|
||||
public partial class Client
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Fio { get; set; } = null!;
|
||||
|
||||
public int ClientCode { get; set; }
|
||||
|
||||
public string Passport { get; set; } = null!;
|
||||
|
||||
public DateOnly Birthday { get; set; }
|
||||
|
||||
public string Address { get; set; } = null!;
|
||||
|
||||
public string Email { get; set; } = null!;
|
||||
|
||||
public string Password { get; set; } = null!;
|
||||
}
|
19
Models/Employee.cs
Normal file
19
Models/Employee.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace demo_hard.Models;
|
||||
|
||||
public partial class Employee
|
||||
{
|
||||
public int EmployeId { get; set; }
|
||||
|
||||
public int RoleId { get; set; }
|
||||
|
||||
public string Fio { get; set; } = null!;
|
||||
|
||||
public string EmployeLogin { get; set; } = null!;
|
||||
|
||||
public string EmployePassword { get; set; } = null!;
|
||||
|
||||
public string? EmployePhoto { get; set; }
|
||||
}
|
13
Models/LastEnter.cs
Normal file
13
Models/LastEnter.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace demo_hard.Models;
|
||||
|
||||
public partial class LastEnter
|
||||
{
|
||||
public int EmployeId { get; set; }
|
||||
|
||||
public DateTime EnterDatetime { get; set; }
|
||||
|
||||
public string EnterType { get; set; } = null!;
|
||||
}
|
25
Models/Order.cs
Normal file
25
Models/Order.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace demo_hard.Models;
|
||||
|
||||
public partial class Order
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string OrderCode { get; set; } = null!;
|
||||
|
||||
public DateOnly OrderDate { get; set; }
|
||||
|
||||
public TimeOnly OrderTime { get; set; }
|
||||
|
||||
public int ClientCode { get; set; }
|
||||
|
||||
public int ServiceId { get; set; }
|
||||
|
||||
public string Status { get; set; } = null!;
|
||||
|
||||
public DateOnly? DateClose { get; set; }
|
||||
|
||||
public int RentalTime { get; set; }
|
||||
}
|
11
Models/Role.cs
Normal file
11
Models/Role.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace demo_hard.Models;
|
||||
|
||||
public partial class Role
|
||||
{
|
||||
public int RoleId { get; set; }
|
||||
|
||||
public string RoleName { get; set; } = null!;
|
||||
}
|
15
Models/Service.cs
Normal file
15
Models/Service.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace demo_hard.Models;
|
||||
|
||||
public partial class Service
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string ServiceName { get; set; } = null!;
|
||||
|
||||
public string ServiceCode { get; set; } = null!;
|
||||
|
||||
public string ServiceCost { get; set; } = null!;
|
||||
}
|
162
Models/User2Context.cs
Normal file
162
Models/User2Context.cs
Normal file
@ -0,0 +1,162 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace demo_hard.Models;
|
||||
|
||||
public partial class User2Context : DbContext
|
||||
{
|
||||
public User2Context()
|
||||
{
|
||||
}
|
||||
|
||||
public User2Context(DbContextOptions<User2Context> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual DbSet<Client> Clients { get; set; }
|
||||
|
||||
public virtual DbSet<Employee> Employees { get; set; }
|
||||
|
||||
public virtual DbSet<LastEnter> LastEnters { get; set; }
|
||||
|
||||
public virtual DbSet<Order> Orders { get; set; }
|
||||
|
||||
public virtual DbSet<Role> Roles { get; set; }
|
||||
|
||||
public virtual DbSet<Service> Services { 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;USERNAME=user2;DATABASE=user2;Password=hGcLvi0i");
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<Client>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("clients_pk");
|
||||
|
||||
entity.ToTable("clients");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.Address)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("address");
|
||||
entity.Property(e => e.Birthday).HasColumnName("birthday");
|
||||
entity.Property(e => e.ClientCode).HasColumnName("client_code");
|
||||
entity.Property(e => e.Email)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("email");
|
||||
entity.Property(e => e.Fio)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("fio");
|
||||
entity.Property(e => e.Passport)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("passport");
|
||||
entity.Property(e => e.Password)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("password");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Employee>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.EmployeId).HasName("employees_pk");
|
||||
|
||||
entity.ToTable("employees");
|
||||
|
||||
entity.Property(e => e.EmployeId)
|
||||
.ValueGeneratedNever()
|
||||
.HasColumnName("employe_id");
|
||||
entity.Property(e => e.EmployeLogin)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("employe_login");
|
||||
entity.Property(e => e.EmployePassword)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("employe_password");
|
||||
entity.Property(e => e.EmployePhoto)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("employe_photo");
|
||||
entity.Property(e => e.Fio)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("fio");
|
||||
entity.Property(e => e.RoleId).HasColumnName("role_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<LastEnter>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.EmployeId).HasName("last_enter_pk");
|
||||
|
||||
entity.ToTable("last_enter");
|
||||
|
||||
entity.Property(e => e.EmployeId)
|
||||
.ValueGeneratedNever()
|
||||
.HasColumnName("employe_id");
|
||||
entity.Property(e => e.EnterDatetime)
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("enter_datetime");
|
||||
entity.Property(e => e.EnterType)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("enter_type");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Order>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("orders_pk");
|
||||
|
||||
entity.ToTable("orders");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
entity.Property(e => e.ClientCode).HasColumnName("client_code");
|
||||
entity.Property(e => e.DateClose).HasColumnName("date_close");
|
||||
entity.Property(e => e.OrderCode)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("order_code");
|
||||
entity.Property(e => e.OrderDate).HasColumnName("order_date");
|
||||
entity.Property(e => e.OrderTime).HasColumnName("order_time");
|
||||
entity.Property(e => e.RentalTime).HasColumnName("rental_time");
|
||||
entity.Property(e => e.ServiceId).HasColumnName("service_id");
|
||||
entity.Property(e => e.Status)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("status");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Role>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.RoleId).HasName("roles_pk");
|
||||
|
||||
entity.ToTable("roles");
|
||||
|
||||
entity.Property(e => e.RoleId).HasColumnName("role_id");
|
||||
entity.Property(e => e.RoleName)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("role_name");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Service>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("service_pk");
|
||||
|
||||
entity.ToTable("service");
|
||||
|
||||
entity.HasIndex(e => e.ServiceCode, "service_unique").IsUnique();
|
||||
|
||||
entity.Property(e => e.Id)
|
||||
.ValueGeneratedNever()
|
||||
.HasColumnName("id");
|
||||
entity.Property(e => e.ServiceCode)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("service_code");
|
||||
entity.Property(e => e.ServiceCost)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("service_cost");
|
||||
entity.Property(e => e.ServiceName)
|
||||
.HasColumnType("character varying")
|
||||
.HasColumnName("service_name");
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("demo_hard")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e8319cee614431d1a9b9d1c9878b71cec61259a0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c91804fd9638a5631768e0f8d9252b7076859bc2")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("demo_hard")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("demo_hard")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
946f5a24939ef6e23b67d0109d55ffc53297d201f2384d6e1f3038aa1754ec52
|
||||
c7751d4c859009911ef8abab35f4913fc67078eaa69e0f8e455111b451d12c80
|
||||
|
@ -1 +1 @@
|
||||
ce241f4d95563f593c3fa12dec7919781dc53e55b898ac2536acd7743b2edee4
|
||||
a04853a7f7fe215ad2bf6414aca2370fba026abbead53c35ab1138596aea4ab4
|
||||
|
@ -159,6 +159,3 @@
|
||||
/home/class_student/RiderProjects/demo_hard/demo_hard/obj/Debug/net8.0/demo_hard.csproj.Up2Date
|
||||
/home/class_student/RiderProjects/demo_hard/demo_hard/obj/Debug/net8.0/demo_hard.genruntimeconfig.cache
|
||||
/home/class_student/RiderProjects/demo_hard/demo_hard/obj/Debug/net8.0/ref/demo_hard.dll
|
||||
/home/class_student/RiderProjects/demo_hard/demo_hard/obj/Debug/net8.0/demo_hard.dll
|
||||
/home/class_student/RiderProjects/demo_hard/demo_hard/obj/Debug/net8.0/refint/demo_hard.dll
|
||||
/home/class_student/RiderProjects/demo_hard/demo_hard/obj/Debug/net8.0/demo_hard.pdb
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user