il, ilce tablosu eklendi.
This commit is contained in:
10
Models/Il.cs
10
Models/Il.cs
@@ -10,13 +10,11 @@ namespace DugunSalonu.Models
|
||||
public class Il
|
||||
|
||||
{
|
||||
public Il()
|
||||
{
|
||||
salons = new HashSet<Salon>();
|
||||
}
|
||||
public Il() => salons = new HashSet<Salon>();
|
||||
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public string Adi { get; set; }
|
||||
public int id { get; set; }
|
||||
public string adi { get; set; }
|
||||
|
||||
ICollection<Salon>? salons { get; set; }
|
||||
}
|
||||
|
29
Models/Ilce.cs
Normal file
29
Models/Ilce.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DugunSalonu.Models
|
||||
{
|
||||
internal class Ilce
|
||||
{
|
||||
public Ilce()
|
||||
{
|
||||
il = new HashSet<Salon>();
|
||||
}
|
||||
|
||||
[Key]
|
||||
public int id { get; set; }
|
||||
[Required]
|
||||
[MaxLength(50)]
|
||||
public required string adi { get; set; }
|
||||
[Required]
|
||||
public required int ilid { get; set; }
|
||||
ICollection<Salon>? il { get; set; }
|
||||
|
||||
ICollection<Salon>? ilce { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -11,27 +11,28 @@ namespace DugunSalonu.Models
|
||||
internal class Kullanici
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public int id { get; set; }
|
||||
|
||||
[MaxLength(50), MinLength(5)]
|
||||
[Required]
|
||||
public required string kullaniciadi { get; set; }
|
||||
[Required]
|
||||
[MaxLength(50)]
|
||||
public required string adi { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(50)]
|
||||
public required string soyadi { get; set; }
|
||||
|
||||
public required string KullaniciAdi { get; set; }
|
||||
public string adisoyadi { get { return $"{adi} {soyadi}"; } }
|
||||
[Required]
|
||||
public required string parola { get; set; }
|
||||
[MaxLength(50)]
|
||||
public required string Adi { get; set; }
|
||||
[Required]
|
||||
[MaxLength(50)]
|
||||
public required string Soyadi { get; set; }
|
||||
|
||||
public string AdiSoyadi { get { return $"{Adi} {Soyadi}"; } }
|
||||
[Required]
|
||||
public required string Parola { get; set; }
|
||||
[MaxLength(50)]
|
||||
public string? Eposta { get; set; }
|
||||
public string? eposta { get; set; }
|
||||
|
||||
[MaxLength(10), MinLength(10)]
|
||||
public string? CepTel { get; set; }
|
||||
public bool Aktif { get; set; }
|
||||
public bool Admin { get; set; }
|
||||
public string? ceptel { get; set; }
|
||||
public bool aktif { get; set; }
|
||||
public bool admin { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -10,20 +10,33 @@ namespace DugunSalonu.Models
|
||||
public class Salon
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public string Adi { get; set; }
|
||||
public string Adres { get; set; }
|
||||
public int IlId { get; set; }
|
||||
public int Ilce { get; set; }
|
||||
public string Eposta { get; set; }
|
||||
public string VergiDairesi { get; set; }
|
||||
public string VergiNumarasi { get; set; }
|
||||
public string Telefon { get; set; }
|
||||
public int id { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(150)]
|
||||
[MinLength(5)]
|
||||
public required string adi { get; set; }
|
||||
|
||||
[MaxLength(250)]
|
||||
public string? adres { get; set; }
|
||||
public int? ilid { get; set; }
|
||||
public int? ilceid { get; set; }
|
||||
|
||||
[Required]
|
||||
public required string eposta { get; set; }
|
||||
public string? vergidairesi { get; set; }
|
||||
public string? verginumarasi { get; set; }
|
||||
|
||||
|
||||
public string? telefon { get; set; }
|
||||
[Required]
|
||||
[MaxLength(10), MinLength(10)]
|
||||
public string CepTel { get; set; }
|
||||
public string WebAdres { get; set; }
|
||||
public required string CepTel { get; set; }
|
||||
public string? webadres { get; set; }
|
||||
|
||||
public Il? il { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -15,6 +15,7 @@ namespace DugunSalonu.Models
|
||||
public DbSet<Salon> salon { get; set; }
|
||||
public DbSet<Il> il { get; set; }
|
||||
|
||||
public DbSet<Ilce> ilce { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
@@ -22,7 +23,7 @@ namespace DugunSalonu.Models
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
/*protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
@@ -38,6 +39,6 @@ namespace DugunSalonu.Models
|
||||
// İsteğe bağlı: Tablo isimlerini de büyük harfe dönüştür (eğer istiyorsanız)
|
||||
entityType.SetTableName(entityType.GetTableName().ToLower());
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user