Изменение модели суточного отчёта

1. Изменён тип суточного отчёта
2. Добавлены новые миграции
This commit is contained in:
Степанов Дмитрий 2023-12-20 16:45:31 +05:00
parent 4ff7b73403
commit 6b03e03865
4 changed files with 9155 additions and 4 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class UpdateDateFormat_DailyReport : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateOnly>(
name: "date",
table: "t_daily_report",
type: "date",
nullable: false,
comment: "Дата формирования отчёта",
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldComment: "Дата формирования отчёта");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateTime>(
name: "date",
table: "t_daily_report",
type: "timestamp with time zone",
nullable: false,
comment: "Дата формирования отчёта",
oldClrType: typeof(DateOnly),
oldType: "date",
oldComment: "Дата формирования отчёта");
}
}
}

View File

@ -278,8 +278,8 @@ namespace AsbCloudDb.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("Date")
.HasColumnType("timestamp with time zone")
b.Property<DateOnly>("Date")
.HasColumnType("date")
.HasColumnName("date")
.HasComment("Дата формирования отчёта");

View File

@ -20,8 +20,8 @@ public class DailyReport : IId
[Column("date_last_update", TypeName = "timestamp with time zone"), Comment("Дата последнего обновления")]
public DateTime? DateLastUpdate { get; set; }
[Column("date", TypeName = "timestamp with time zone"), Comment("Дата формирования отчёта")]
public DateTime Date { get; set; }
[Column("date", TypeName = "date"), Comment("Дата формирования отчёта")]
public DateOnly Date { get; set; }
[Column("sign_block", TypeName = "jsonb"), Comment("Подпись")]
public SignBlock? SignBlock { get; set; }