This commit is contained in:
David Štaleker
2024-02-25 20:09:43 +01:00
parent 28d1630749
commit 4df426dc10
614 changed files with 121469 additions and 7647 deletions

View File

@@ -0,0 +1,37 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ZpcBulletinBoard.Models.Editor
{
public class BulletinBoard
{
public enum RatioEnum
{
[Display(Name = "16:9")]
Ratio16To9 = 1,
[Display(Name = "4:3")]
Ratio4To3 = 2
}
[Key]
public int IdBulletinBoard { get; set; }
[Required]
[Index("IX_BulletinBoardUnique", 1, IsUnique = true)]
public Guid Guid { get; set; }
[Required]
[Display(Name = "Ime")]
public string Name { get; set; }
[Required]
[Display(Name = "Razmerje")]
public RatioEnum Ratio { get; set; }
// InvoicePart
[InverseProperty("BulletinBoard")]
public virtual ICollection<Note> Notes { get; set; }
}
}

View File

@@ -0,0 +1,36 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace ZpcBulletinBoard.Models.Editor
{
public class Note
{
[Key]
public int IdNote { get; set; }
[Required]
[ForeignKey("BulletinBoard")]
public int IdBulletinBoard { get; set; }
[Required]
public int X { get; set; }
[Required]
public int Y { get; set; }
[Required]
public int Width { get; set; }
[Required]
public int Height { get; set; }
[Required]
public string Title { get; set; }
[Required]
public string Content { get; set; }
// ForeignKey
public BulletinBoard BulletinBoard{ get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
namespace ZpcBulletinBoard.Models
{
public class IdentityApplicationRole : IdentityRole<int>
{
[Required]
public string Description { get; set; }
[Required]
public bool Active { get; set; }
}
}

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
namespace ZpcBulletinBoard.Models
{
public class IdentityApplicationUser : IdentityUser<int>
{
[Required]
public string Name { get; set; }
[Required]
public string Surname { get; set; }
[Required]
public DateTime DateCreated { get; set; }
[Required]
public DateTime DateValidUntil { get; set; }
[Required]
public bool Active { get; set; }
}
}