feat: implement tenant product category management APIs
All checks were successful
Build and Deploy TenantApi / build-and-deploy (push) Successful in 44s

This commit is contained in:
2026-02-20 18:45:48 +08:00
parent eea8a53da3
commit 1b3525862a
41 changed files with 9951 additions and 2 deletions

View File

@@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TakeoutSaaS.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddProductCategoryIconAndChannels : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "ChannelsJson",
table: "product_categories",
type: "text",
nullable: false,
defaultValue: "[\"wm\"]",
comment: "分类可见渠道 JSON。");
migrationBuilder.AddColumn<string>(
name: "Icon",
table: "product_categories",
type: "character varying(512)",
maxLength: 512,
nullable: true,
comment: "分类图标。");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ChannelsJson",
table: "product_categories");
migrationBuilder.DropColumn(
name: "Icon",
table: "product_categories");
}
}
}

View File

@@ -4351,6 +4351,13 @@ namespace TakeoutSaaS.Infrastructure.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<string>("ChannelsJson")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasDefaultValue("[\"wm\"]")
.HasComment("分类可见渠道 JSON。");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasComment("创建时间UTC。");
@@ -4372,6 +4379,11 @@ namespace TakeoutSaaS.Infrastructure.Migrations
.HasColumnType("character varying(256)")
.HasComment("分类描述。");
b.Property<string>("Icon")
.HasMaxLength(512)
.HasColumnType("character varying(512)")
.HasComment("分类图标。");
b.Property<bool>("IsEnabled")
.HasColumnType("boolean")
.HasComment("是否启用。");
@@ -5862,7 +5874,6 @@ namespace TakeoutSaaS.Infrastructure.Migrations
b.Property<byte[]>("RowVersion")
.IsConcurrencyToken()
.IsRequired()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("bytea")
.HasComment("并发控制字段。");
@@ -5949,7 +5960,6 @@ namespace TakeoutSaaS.Infrastructure.Migrations
b.Property<byte[]>("RowVersion")
.IsConcurrencyToken()
.IsRequired()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("bytea")
.HasComment("并发控制字段。");