adding hidden basic asp.net core backend (#30)
Base functionality:
DB
email sending
user registration & login
storing new characters and reading them back
Notes:
Functionality is "hidden" with no links pointing to it.
Most pages are scaffolded and not reviewed at all :(
local Dev db setup is pushed to git
NO local email setup :(
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Kemkas.Web.Db.Models;
|
||||
|
||||
public class ApplicationRole : IdentityRole<int>
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Kemkas.Web.Db.Models;
|
||||
|
||||
public class ApplicationUser : IdentityUser<int>
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Kemkas.Web.Db.Models;
|
||||
|
||||
public class V1Felszereles
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public Guid KarakterId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public bool IsFegyver { get; set; } = true;
|
||||
|
||||
[ForeignKey(nameof(KarakterId))]
|
||||
public virtual V1Karakter Karakter { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Kemkas.Web.Db.Enums;
|
||||
|
||||
namespace Kemkas.Web.Db.Models;
|
||||
|
||||
public class V1Karakter
|
||||
{
|
||||
[Key] public Guid Id { get; set; }
|
||||
public bool IsPublic { get; set; } = false;
|
||||
public int? OwnerUserId { get; set; }
|
||||
|
||||
public string Nev { get; set; }
|
||||
public string? Nem { get; set; }
|
||||
public double? Kor { get; set; }
|
||||
public Jellem Jellem { get; set; } = Jellem.Semleges;
|
||||
public string? Isten { get; set; }
|
||||
public Faj Faj { get; set; } = Faj.Ember;
|
||||
public Osztaly Osztaly { get; set; }
|
||||
public byte Ero { get; set; }
|
||||
public byte Ugyesseg { get; set; }
|
||||
public byte Egeszseg { get; set; }
|
||||
public byte Intelligencia { get; set; }
|
||||
public byte Bolcsesseg { get; set; }
|
||||
public byte Karizma { get; set; }
|
||||
public byte Szint { get; set; } = 1;
|
||||
|
||||
public string? Pancel { get; set; }
|
||||
public string? Pajzs { get; set; }
|
||||
|
||||
[ForeignKey(nameof(OwnerUserId))]
|
||||
public ApplicationUser? OwnerUser { get; set; }
|
||||
|
||||
[InverseProperty(nameof(V1KarakterKepzettseg.Karakter))]
|
||||
public virtual IEnumerable<V1KarakterKepzettseg> KarakterKepzettsegek { get; set; }
|
||||
|
||||
[InverseProperty(nameof(V1Szintlepes.Karakter))]
|
||||
public virtual IEnumerable<V1Szintlepes> Szintlepesek { get; set; }
|
||||
|
||||
[InverseProperty(nameof(V1Felszereles.Karakter))]
|
||||
public virtual IEnumerable<V1Felszereles> Felszereles { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Kemkas.Web.Db.Enums;
|
||||
|
||||
namespace Kemkas.Web.Db.Models;
|
||||
|
||||
public class V1KarakterKepzettseg
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public Guid KarakterId { get; set; }
|
||||
public Kepzettseg Kepzettseg { get; set; }
|
||||
public bool IsTolvajKepzettseg { get; set; } = false;
|
||||
|
||||
[ForeignKey(nameof(KarakterId))]
|
||||
public virtual V1Karakter Karakter { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Kemkas.Web.Db.Enums;
|
||||
|
||||
namespace Kemkas.Web.Db.Models;
|
||||
|
||||
public class V1Szintlepes
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public Guid KarakterId { get; set; }
|
||||
|
||||
public byte KarakterSzint { get; set; }
|
||||
|
||||
// for multiclass characters
|
||||
// public Osztaly Osztaly { get; set; }
|
||||
//
|
||||
// public byte OsztalySzint { get; set; }
|
||||
|
||||
public byte HpRoll { get; set; }
|
||||
public Tulajdonsag? TulajdonsagNoveles { get; set; }
|
||||
public string? FegyverSpecializacio { get; set; }
|
||||
|
||||
[ForeignKey(nameof(KarakterId))]
|
||||
public virtual V1Karakter Karakter { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user