School Commit Init

This commit is contained in:
2024-08-31 12:07:21 +03:00
commit 0b130ee18c
2801 changed files with 4720552 additions and 0 deletions
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using District_3_App.ExtraInfo;
namespace District_3_App.ProfileSocialNetworkInfoStuff.Entities
{
public class BlockedProfile : IComparable<BlockedProfile>
{
public User User { get; set; }
public DateTime BlockDate { get; set; }
public BlockedProfile()
{
}
public BlockedProfile(User user, DateTime date)
{
this.User = user;
this.BlockDate = date;
}
public string DateToString()
{
return BlockDate.ToString("yyyy-MM-dd HH:mm:ss");
}
public int CompareTo(BlockedProfile other)
{
return this.BlockDate.CompareTo(other.BlockDate);
}
}
}
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace District_3_App.ProfileSocialNetworkInfoStuff.Entities
{
public class CloseFriendProfile : IComparable<CloseFriendProfile>
{
public User User { get; set; }
public DateTime CloseFriendedDate { get; set; }
public CloseFriendProfile()
{
}
public CloseFriendProfile(User user, DateTime closeFriendedDate)
{
this.User = user;
this.CloseFriendedDate = closeFriendedDate;
}
public int CompareTo(CloseFriendProfile other)
{
return this.User.CompareTo(other.User);
}
}
}
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using District_3_App.ExtraInfo;
namespace District_3_App.ProfileSocialNetworkInfoStuff.Entities
{
public class Group : IComparable<Group>
{
public Guid Id { get; set; }
public string GroupName { get; set; }
public List<User> GroupMembers { get; set; }
public Group()
{
}
public Group(Guid id, string groupName, List<User> groupMembers)
{
this.Id = id;
this.GroupName = groupName;
this.GroupMembers = groupMembers;
}
public int CompareTo(Group other)
{
return this.GroupName.CompareTo(other.GroupName);
}
}
}
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace District_3_App.ProfileSocialNetworkInfoStuff.Entities
{
public class User : IComparable<User> // MODIFY UML DIAGRAM USER CLASS
{
public Guid Id { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string Email { get; set; }
public string ConfirmationPassword { get; set; }
public DateTime RegistrationDate { get; set; }
public int FollowingCount { get; set; }
public int FollowersCount { get; set; }
public TimeSpan Usersession { get; set; }
public User()
{
}
public User(Guid id, string username, string password, string email, string confirmationPassword)
{
this.Id = id;
this.Username = username;
this.Password = password;
this.Email = email;
this.ConfirmationPassword = confirmationPassword;
}
public User(Guid id, string username, string password, string email, string confirmationPassword, int followingCount, int followersCount)
{
this.Id = id;
this.Username = username;
this.Password = password;
this.Email = email;
this.ConfirmationPassword = confirmationPassword;
this.FollowersCount = followersCount;
this.FollowingCount = followingCount;
}
public User(Guid id, string username, string password, string email, string confirmationPassword, TimeSpan usersession)
{
this.Id = id;
this.Username = username;
this.Password = password;
this.Email = email;
this.ConfirmationPassword = confirmationPassword;
this.Usersession = usersession;
}
public string RegistrationDateToString()
{
return this.RegistrationDate.ToString("yyyy-MM-dd HH:mm:ss");
}
public int CompareTo(User other)
{
return this.Username.CompareTo(other.Username);
}
}
}
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace District_3_App.ProfileSocialNetworkInfoStuff.Entities
{
public class UserProfileSocialNetworkInfo
{
public User User { get; set; }
public List<BlockedProfile> BlockedProfiles { get; set; }
public List<CloseFriendProfile> CloseFriendsProfiles { get; set; }
public List<Group> Groups { get; set; }
public List<User> RestrictedStoriesAudience { get; set; }
public List<User> RestrictedPostsAudience { get; set; }
public bool IsProfilePrivate { get; set; }
public UserProfileSocialNetworkInfo()
{
// Create mock data with default values
User = new User();
BlockedProfiles = new List<BlockedProfile>();
CloseFriendsProfiles = new List<CloseFriendProfile>();
Groups = new List<Group>();
RestrictedStoriesAudience = new List<User>();
RestrictedPostsAudience = new List<User>();
IsProfilePrivate = false; // Assuming the default profile privacy is set to public
}
public UserProfileSocialNetworkInfo(User user, List<BlockedProfile> blockedProfiles, List<CloseFriendProfile> closeFriendsProfiles, List<Group> groups, List<User> restrictedStoriesAudience, List<User> restrictedPostsAudience)
{
this.User = user;
this.BlockedProfiles = blockedProfiles;
this.CloseFriendsProfiles = closeFriendsProfiles;
this.Groups = groups;
this.RestrictedStoriesAudience = restrictedStoriesAudience;
this.RestrictedPostsAudience = restrictedPostsAudience;
this.IsProfilePrivate = false;
}
}
}