Skip to content

Commit

Permalink
Merge pull request #84 from soft-eng-practicum/filesToPostgre
Browse files Browse the repository at this point in the history
shifted blobfiles from azure to postgre
  • Loading branch information
cengique authored Jul 26, 2024
2 parents 1300834 + ae868fb commit 4e4a4f0
Show file tree
Hide file tree
Showing 39 changed files with 4,148 additions and 792 deletions.
9 changes: 8 additions & 1 deletion src/Analysim.Core/Entities/BlobFile.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
using Analysim.Core.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

Expand Down Expand Up @@ -44,5 +46,10 @@ public class BlobFile
public Project Project { get; set; }
public int? ProjectID { get; set; }

public ICollection<BlobFileContent> BlobFileContents
{
get; set;
}

}
}
25 changes: 25 additions & 0 deletions src/Analysim.Core/Entities/BlobFileContent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Core.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Analysim.Core.Entities
{
public class BlobFileContent
{
[KeyAttribute]
[ForeignKey("BlobFile")]
public int BlobFileID { get; set; }
public BlobFile BlobFile { get; set; }

[Required(ErrorMessage = "Blobfile content is a required field.")]
public byte[] Content { get; set; }

[Required(ErrorMessage = "BlobFile Date is a required field.")]
public DateTimeOffset DateCreated { get; set; }
}
}
2 changes: 2 additions & 0 deletions src/Analysim.Core/Entities/ObservableNotebookDataset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public class ObservableNotebookDataset

public string datasetName { get; set; }

public int BlobFileID { get; set; }

public string datasetURL { get; set; }

public Notebook notebook
Expand Down
38 changes: 0 additions & 38 deletions src/Analysim.Core/Interfaces/IBlobService.cs

This file was deleted.

300 changes: 0 additions & 300 deletions src/Analysim.Core/Services/BlobService.cs

This file was deleted.

Loading

0 comments on commit 4e4a4f0

Please sign in to comment.