You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
937 B
38 lines
937 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Entity
|
|
{
|
|
public class Commentary
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey(nameof(Users))]
|
|
public int IdUser { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey(nameof(Quote))]
|
|
public int IdQuote { get; set; }
|
|
|
|
[Required]
|
|
[Column("DateCommentary", TypeName = "date")]
|
|
public DateTime DateCommentary { get; set; }
|
|
|
|
[Required]
|
|
[MaxLength(100)]
|
|
public string Comment { get; set; }
|
|
|
|
public Quote Quote { get; set; } = null!;
|
|
|
|
public Users User { get; set; } = null!;
|
|
}
|
|
}
|