This commit is contained in:
Alex 2025-01-28 22:01:17 +03:00
parent c1fa6882d4
commit 10d3bfe275
118 changed files with 512 additions and 0 deletions

View File

@ -0,0 +1 @@
AvaloniaValidation

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class Activity
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public virtual ICollection<Activitymoderator> Activitymoderators { get; set; } = new List<Activitymoderator>();
public virtual ICollection<Activitywinner> Activitywinners { get; set; } = new List<Activitywinner>();
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class Activitymoderator
{
public int Activityid { get; set; }
public int Moderatorid { get; set; }
public virtual Activity Activity { get; set; } = null!;
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class Activitywinner
{
public int Activityid { get; set; }
public int Winnerid { get; set; }
public virtual Activity Activity { get; set; } = null!;
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class City
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public virtual ICollection<Event> Events { get; set; } = new List<Event>();
}

View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class Client
{
public int Id { get; set; }
public string Fio { get; set; } = null!;
public string Email { get; set; } = null!;
public DateTime Date { get; set; }
public int Country { get; set; }
public string Phone { get; set; } = null!;
public string Password { get; set; } = null!;
public string? Spec { get; set; }
public string? Meropriyatie { get; set; }
public string Photopath { get; set; } = null!;
public char Gender { get; set; }
public int Role { get; set; }
public virtual Country CountryNavigation { get; set; } = null!;
public virtual Role RoleNavigation { get; set; } = null!;
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class Country
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public string EnName { get; set; } = null!;
public string Code { get; set; } = null!;
public int Code2 { get; set; }
public virtual ICollection<Client> Clients { get; set; } = new List<Client>();
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class Event
{
public int Id { get; set; }
public string Sobitie { get; set; } = null!;
public DateTime Date { get; set; }
public int Days { get; set; }
public int City { get; set; }
public string? Photo { get; set; }
public virtual City CityNavigation { get; set; } = null!;
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class Eventactivity
{
public int Eventid { get; set; }
public int Activityid { get; set; }
public virtual Activity Activity { get; set; } = null!;
public virtual Event Event { get; set; } = null!;
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class Jhuriactivity
{
public int Activityid { get; set; }
public int? Jhuriid { get; set; }
public virtual Activity Activity { get; set; } = null!;
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class JuryEvent
{
public int? JuryId { get; set; }
public int? EventId { get; set; }
public virtual Client? Jury { get; set; }
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class ModerEvent
{
public int? ModerId { get; set; }
public int? EventId { get; set; }
public virtual Client? Moder { get; set; }
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace AvaloniaValidation.Models;
public partial class Role
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public virtual ICollection<Client> Clients { get; set; } = new List<Client>();
}

View File

@ -0,0 +1,287 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
namespace AvaloniaValidation.Models;
public partial class User1Context : DbContext
{
public User1Context()
{
}
public User1Context(DbContextOptions<User1Context> options)
: base(options)
{
}
public virtual DbSet<Activity> Activities { get; set; }
public virtual DbSet<Activitymoderator> Activitymoderators { get; set; }
public virtual DbSet<Activitywinner> Activitywinners { get; set; }
public virtual DbSet<City> Cities { get; set; }
public virtual DbSet<Client> Clients { get; set; }
public virtual DbSet<Country> Countries { get; set; }
public virtual DbSet<Event> Events { get; set; }
public virtual DbSet<Eventactivity> Eventactivities { get; set; }
public virtual DbSet<Jhuriactivity> Jhuriactivities { get; set; }
public virtual DbSet<JuryEvent> JuryEvents { get; set; }
public virtual DbSet<ModerEvent> ModerEvents { get; set; }
public virtual DbSet<Role> Roles { 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=5421;Database=user1;Username=user1;Password=Xgny6RrJ");
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Activity>(entity =>
{
entity.HasKey(e => e.Id).HasName("activity_pkey");
entity.ToTable("activity");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Name)
.HasMaxLength(100)
.HasColumnName("name");
});
modelBuilder.Entity<Activitymoderator>(entity =>
{
entity.HasKey(e => new { e.Activityid, e.Moderatorid }).HasName("activitymoderator_pkey");
entity.ToTable("activitymoderator");
entity.Property(e => e.Activityid).HasColumnName("activityid");
entity.Property(e => e.Moderatorid).HasColumnName("moderatorid");
entity.HasOne(d => d.Activity).WithMany(p => p.Activitymoderators)
.HasForeignKey(d => d.Activityid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_activity");
});
modelBuilder.Entity<Activitywinner>(entity =>
{
entity.HasKey(e => new { e.Activityid, e.Winnerid }).HasName("activitywinner_pkey");
entity.ToTable("activitywinner");
entity.Property(e => e.Activityid).HasColumnName("activityid");
entity.Property(e => e.Winnerid).HasColumnName("winnerid");
entity.HasOne(d => d.Activity).WithMany(p => p.Activitywinners)
.HasForeignKey(d => d.Activityid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_activity");
});
modelBuilder.Entity<City>(entity =>
{
entity.HasKey(e => e.Id).HasName("city_pkey");
entity.ToTable("city");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Name)
.HasMaxLength(100)
.HasColumnName("name");
});
modelBuilder.Entity<Client>(entity =>
{
entity.HasKey(e => e.Id).HasName("clients_pkey");
entity.ToTable("clients");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Country).HasColumnName("country");
entity.Property(e => e.Date)
.HasColumnType("timestamp(6) without time zone")
.HasColumnName("date");
entity.Property(e => e.Email)
.HasMaxLength(100)
.HasColumnName("email");
entity.Property(e => e.Fio)
.HasMaxLength(200)
.HasColumnName("fio");
entity.Property(e => e.Gender)
.HasMaxLength(1)
.HasColumnName("gender");
entity.Property(e => e.Meropriyatie)
.HasMaxLength(100)
.HasColumnName("meropriyatie");
entity.Property(e => e.Password)
.HasMaxLength(50)
.HasColumnName("password");
entity.Property(e => e.Phone)
.HasMaxLength(20)
.HasColumnName("phone");
entity.Property(e => e.Photopath)
.HasMaxLength(100)
.HasColumnName("photopath");
entity.Property(e => e.Role).HasColumnName("role");
entity.Property(e => e.Spec)
.HasMaxLength(50)
.HasColumnName("spec");
entity.HasOne(d => d.CountryNavigation).WithMany(p => p.Clients)
.HasForeignKey(d => d.Country)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_country");
entity.HasOne(d => d.RoleNavigation).WithMany(p => p.Clients)
.HasForeignKey(d => d.Role)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_role");
});
modelBuilder.Entity<Country>(entity =>
{
entity.HasKey(e => e.Id).HasName("country_pkey");
entity.ToTable("country");
entity.HasIndex(e => e.Code2, "country_code2_key").IsUnique();
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Code)
.HasMaxLength(5)
.HasColumnName("code");
entity.Property(e => e.Code2).HasColumnName("code2");
entity.Property(e => e.EnName)
.HasMaxLength(100)
.HasColumnName("en_name");
entity.Property(e => e.Name)
.HasMaxLength(100)
.HasColumnName("name");
});
modelBuilder.Entity<Event>(entity =>
{
entity.HasKey(e => e.Id).HasName("event_pkey");
entity.ToTable("event");
entity.HasIndex(e => e.Date, "event_date_key").IsUnique();
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.City).HasColumnName("city");
entity.Property(e => e.Date)
.HasColumnType("timestamp(6) without time zone")
.HasColumnName("date");
entity.Property(e => e.Days).HasColumnName("days");
entity.Property(e => e.Photo)
.HasMaxLength(100)
.HasColumnName("photo");
entity.Property(e => e.Sobitie)
.HasMaxLength(200)
.HasColumnName("sobitie");
entity.HasOne(d => d.CityNavigation).WithMany(p => p.Events)
.HasForeignKey(d => d.City)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_city");
});
modelBuilder.Entity<Eventactivity>(entity =>
{
entity
.HasNoKey()
.ToTable("eventactivity");
entity.Property(e => e.Activityid).HasColumnName("activityid");
entity.Property(e => e.Eventid).HasColumnName("eventid");
entity.HasOne(d => d.Activity).WithMany()
.HasForeignKey(d => d.Activityid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_activity");
entity.HasOne(d => d.Event).WithMany()
.HasForeignKey(d => d.Eventid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_event");
});
modelBuilder.Entity<Jhuriactivity>(entity =>
{
entity
.HasNoKey()
.ToTable("jhuriactivity");
entity.Property(e => e.Activityid).HasColumnName("activityid");
entity.Property(e => e.Jhuriid).HasColumnName("jhuriid");
entity.HasOne(d => d.Activity).WithMany()
.HasForeignKey(d => d.Activityid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_activity");
});
modelBuilder.Entity<JuryEvent>(entity =>
{
entity
.HasNoKey()
.ToTable("jury_event");
entity.Property(e => e.EventId).HasColumnName("event_id");
entity.Property(e => e.JuryId).HasColumnName("jury_id");
entity.HasOne(d => d.Jury).WithMany()
.HasForeignKey(d => d.JuryId)
.HasConstraintName("fk_clients_for_jury_event");
});
modelBuilder.Entity<ModerEvent>(entity =>
{
entity
.HasNoKey()
.ToTable("moder_event");
entity.Property(e => e.EventId).HasColumnName("event_id");
entity.Property(e => e.ModerId).HasColumnName("moder_id");
entity.HasOne(d => d.Moder).WithMany()
.HasForeignKey(d => d.ModerId)
.HasConstraintName("fk_client_for_moder_event");
});
modelBuilder.Entity<Role>(entity =>
{
entity.HasKey(e => e.Id).HasName("roles_pkey");
entity.ToTable("roles");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Name)
.HasMaxLength(20)
.HasColumnName("name");
});
modelBuilder.HasSequence("client_seq");
modelBuilder.HasSequence("clientservice_seq");
modelBuilder.HasSequence("documentbyservice_seq");
modelBuilder.HasSequence("manufacturer_seq");
modelBuilder.HasSequence("product_seq");
modelBuilder.HasSequence("productphoto_seq");
modelBuilder.HasSequence("productsale_seq");
modelBuilder.HasSequence("service_seq");
modelBuilder.HasSequence("servicephoto_seq");
modelBuilder.HasSequence("tag_seq");
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More