✨ Profile links
This commit is contained in:
		@@ -125,6 +125,7 @@ public class AccountProfile : ModelBase, IIdentifiedResource
 | 
			
		||||
    [MaxLength(1024)] public string? Pronouns { get; set; }
 | 
			
		||||
    [MaxLength(1024)] public string? TimeZone { get; set; }
 | 
			
		||||
    [MaxLength(1024)] public string? Location { get; set; }
 | 
			
		||||
    [Column(TypeName = "jsonb")] public Dictionary<string, string>? Links { get; set; }
 | 
			
		||||
    public Instant? Birthday { get; set; }
 | 
			
		||||
    public Instant? LastSeenAt { get; set; }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -77,6 +77,7 @@ public class AccountCurrentController(
 | 
			
		||||
        [MaxLength(1024)] public string? Location { get; set; }
 | 
			
		||||
        [MaxLength(4096)] public string? Bio { get; set; }
 | 
			
		||||
        public Instant? Birthday { get; set; }
 | 
			
		||||
        public Dictionary<string, string>? Links { get; set; }
 | 
			
		||||
 | 
			
		||||
        [MaxLength(32)] public string? PictureId { get; set; }
 | 
			
		||||
        [MaxLength(32)] public string? BackgroundId { get; set; }
 | 
			
		||||
@@ -102,6 +103,7 @@ public class AccountCurrentController(
 | 
			
		||||
        if (request.Birthday is not null) profile.Birthday = request.Birthday;
 | 
			
		||||
        if (request.Location is not null) profile.Location = request.Location;
 | 
			
		||||
        if (request.TimeZone is not null) profile.TimeZone = request.TimeZone;
 | 
			
		||||
        if (request.Links is not null) profile.Links = request.Links;
 | 
			
		||||
 | 
			
		||||
        if (request.PictureId is not null)
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1747
									
								
								DysonNetwork.Pass/Migrations/20250808152643_AddProfileLinks.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										1747
									
								
								DysonNetwork.Pass/Migrations/20250808152643_AddProfileLinks.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using Microsoft.EntityFrameworkCore.Migrations;
 | 
			
		||||
 | 
			
		||||
#nullable disable
 | 
			
		||||
 | 
			
		||||
namespace DysonNetwork.Pass.Migrations
 | 
			
		||||
{
 | 
			
		||||
    /// <inheritdoc />
 | 
			
		||||
    public partial class AddProfileLinks : Migration
 | 
			
		||||
    {
 | 
			
		||||
        /// <inheritdoc />
 | 
			
		||||
        protected override void Up(MigrationBuilder migrationBuilder)
 | 
			
		||||
        {
 | 
			
		||||
            migrationBuilder.AddColumn<Dictionary<string, string>>(
 | 
			
		||||
                name: "links",
 | 
			
		||||
                table: "account_profiles",
 | 
			
		||||
                type: "jsonb",
 | 
			
		||||
                nullable: true);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <inheritdoc />
 | 
			
		||||
        protected override void Down(MigrationBuilder migrationBuilder)
 | 
			
		||||
        {
 | 
			
		||||
            migrationBuilder.DropColumn(
 | 
			
		||||
                name: "links",
 | 
			
		||||
                table: "account_profiles");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -431,6 +431,10 @@ namespace DysonNetwork.Pass.Migrations
 | 
			
		||||
                        .HasColumnType("timestamp with time zone")
 | 
			
		||||
                        .HasColumnName("last_seen_at");
 | 
			
		||||
 | 
			
		||||
                    b.Property<Dictionary<string, string>>("Links")
 | 
			
		||||
                        .HasColumnType("jsonb")
 | 
			
		||||
                        .HasColumnName("links");
 | 
			
		||||
 | 
			
		||||
                    b.Property<string>("Location")
 | 
			
		||||
                        .HasMaxLength(1024)
 | 
			
		||||
                        .HasColumnType("character varying(1024)")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user