Skip to content
Snippets Groups Projects
Commit b6458fdf authored by Lucca Santangelo's avatar Lucca Santangelo
Browse files

add theme in tenant entity

parent 500c9dba
No related branches found
No related tags found
1 merge request!35add theme in tenant entity
......@@ -7,5 +7,6 @@ namespace Tsi1.BusinessLayer.Dtos
public class TenantCreateDto
{
public string Name { get; set; }
public string Theme { get; set; }
}
}
......@@ -7,7 +7,7 @@ namespace Tsi1.BusinessLayer.Dtos
public class TenantPreviewDto
{
public int Id { get; set; }
public string Name { get; set; }
public string Theme { get; set; }
}
}
......@@ -17,15 +17,14 @@ namespace Tsi1.DataLayer.Entities
}
public int Id { get; set; }
public string Name { get; set; }
public string Theme { get; set; }
public ICollection<Course> Courses { get; set; }
public ICollection<Professor> Professors { get; set; }
public ICollection<Student> Students { get; set; }
public ICollection<User> Users { get; set; }
public ICollection<Survey> Surveys { get; set; }
public ICollection<Communication> Communications { get; set; }
}
}
......@@ -20,6 +20,9 @@ namespace Tsi1.DataLayer.EntityConfiguration
.IsRequired()
.HasColumnType("character varying(50)");
builder.Property(x => x.Theme)
.IsRequired()
.HasColumnType("character varying(200)");
}
}
}
This diff is collapsed.
using Microsoft.EntityFrameworkCore.Migrations;
namespace Tsi1.DataLayer.Migrations
{
public partial class tenanttheme : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Theme",
table: "Tenants",
type: "character varying(200)",
nullable: false,
defaultValue: "");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Theme",
table: "Tenants");
}
}
}
......@@ -580,6 +580,10 @@ namespace Tsi1.DataLayer.Migrations
.IsRequired()
.HasColumnType("character varying(50)");
b.Property<string>("Theme")
.IsRequired()
.HasColumnType("character varying(200)");
b.HasKey("Id");
b.HasIndex("Name")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment