Saving
This commit is contained in:
		
							
								
								
									
										22
									
								
								PrivaPub/Models/Post/DmPost.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								PrivaPub/Models/Post/DmPost.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
using MongoDB.Entities;
 | 
			
		||||
 | 
			
		||||
namespace PrivaPub.Models.Post
 | 
			
		||||
{
 | 
			
		||||
	public class DmPost : Entity
 | 
			
		||||
	{
 | 
			
		||||
		public string GroupUserId { get; set; }
 | 
			
		||||
		public string AnsweringToPostId { get; set; }
 | 
			
		||||
		public string GroupId { get; set; }
 | 
			
		||||
		public string Title { get; set; }
 | 
			
		||||
		public string Text { get; set; }
 | 
			
		||||
		public List<PostMedia> Media { get; set; } = new();
 | 
			
		||||
		public List<float> Location { get; set; } = new();
 | 
			
		||||
		public bool HasContentWarning { get; set; } = false;
 | 
			
		||||
 | 
			
		||||
		public bool IsFederatedCopy { get; set; }
 | 
			
		||||
 | 
			
		||||
		public DateTime CreationDate { get; set; } = DateTime.UtcNow;
 | 
			
		||||
		public DateTime? UpdateDate { get; set; } = DateTime.UtcNow;
 | 
			
		||||
		public string UpdateReason { get; set; }
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										23
									
								
								PrivaPub/Models/Post/Post.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								PrivaPub/Models/Post/Post.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
using MongoDB.Entities;
 | 
			
		||||
 | 
			
		||||
namespace PrivaPub.Models.Post
 | 
			
		||||
{
 | 
			
		||||
	public class Post : Entity
 | 
			
		||||
	{
 | 
			
		||||
		public string GroupUserId { get; set; }
 | 
			
		||||
		public string AnsweringToPostId { get; set; }
 | 
			
		||||
		public string GroupId { get; set; }
 | 
			
		||||
		public string Title { get; set; }
 | 
			
		||||
		public string Text { get; set; }
 | 
			
		||||
		public List<PostMedia> Media { get; set; } = new();
 | 
			
		||||
		public List<float> Location { get; set; } = new();
 | 
			
		||||
		public float RangeKm { get; set; } = 5.0f;
 | 
			
		||||
		public bool HasContentWarning { get; set; } = false;
 | 
			
		||||
 | 
			
		||||
		public bool IsFederatedCopy { get; set; }
 | 
			
		||||
 | 
			
		||||
		public DateTime CreationDate { get; set; } = DateTime.UtcNow;
 | 
			
		||||
		public DateTime? UpdateDate { get; set; } = DateTime.UtcNow;
 | 
			
		||||
		public string UpdateReason { get; set; }
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								PrivaPub/Models/Post/PostBoost.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								PrivaPub/Models/Post/PostBoost.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
namespace PrivaPub.Models.Post
 | 
			
		||||
{
 | 
			
		||||
	public class PostBoost
 | 
			
		||||
	{
 | 
			
		||||
		public string PostId { get; set; }
 | 
			
		||||
		public string GroupUserId { get; set; }
 | 
			
		||||
 | 
			
		||||
		public bool IsFederatedCopy { get; set; }
 | 
			
		||||
 | 
			
		||||
		public DateTime CreationDate { get; set; }
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								PrivaPub/Models/Post/PostMedia.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								PrivaPub/Models/Post/PostMedia.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
namespace PrivaPub.Models.Post
 | 
			
		||||
{
 | 
			
		||||
	public class PostMedia
 | 
			
		||||
	{
 | 
			
		||||
		public Guid Id { get; set; } = Guid.NewGuid(); 
 | 
			
		||||
		public string ContentType { get; set; }
 | 
			
		||||
		public string FileName { get; set; }
 | 
			
		||||
		public string Extension { get; set; }
 | 
			
		||||
		public string Path { get; set; }
 | 
			
		||||
		public string URL { get; set; }
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user