Drugi
This commit is contained in:
37
ZpcBulletinBoard/Models/Editor/BulletinBoard.cs
Normal file
37
ZpcBulletinBoard/Models/Editor/BulletinBoard.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
36
ZpcBulletinBoard/Models/Editor/Note.cs
Normal file
36
ZpcBulletinBoard/Models/Editor/Note.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user