添加项目文件。
This commit is contained in:
49
Entities/Contracts/AssignmentAttachment.cs
Normal file
49
Entities/Contracts/AssignmentAttachment.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
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;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Entities.Contracts
|
||||
{
|
||||
[Table("assignment_attachments")]
|
||||
public class AssignmentAttachment
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("assignment_id")]
|
||||
[ForeignKey("Assignment")]
|
||||
public Guid AssignmentId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("file_path")]
|
||||
[StringLength(255)]
|
||||
public string FilePath { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("file_name")]
|
||||
[StringLength(255)]
|
||||
public string FileName { get; set; }
|
||||
|
||||
[Column("uploaded_at")]
|
||||
public DateTime UploadedAt { get; set; }
|
||||
|
||||
[Column("deleted")]
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
// Navigation Properties
|
||||
public Assignment Assignment { get; set; }
|
||||
|
||||
public AssignmentAttachment()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user