Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User/machoene/fix added dsicriminator on mobiledevice #452

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions shesha-core/src/Shesha.Core/Domain/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Shesha.Domain.Attributes;
using Shesha.Domain.Enums;
using System;
using System.ComponentModel.DataAnnotations;

namespace Shesha.Domain
{
Expand All @@ -19,12 +20,22 @@ public class Account : FullAuditedEntity<Guid>
public virtual Site PrimarySite { get; set; }

public virtual string AccountNo { get; set; }

[ReferenceList("Shesha.Core", "AccountStatus")]
public virtual RefListAccountStatus? Status { get; set; }

[ReferenceList("Shesha.Core", "AccountType")]
public virtual RefListAccountType? AccountType { get; set; }

public virtual DateTime? ActiveFromDate { get; set; }

public virtual DateTime? ActiveToDate { get; set; }

[StringLength(200)]
public virtual string ContactEmail { get; set; }

[StringLength(50)]
public virtual string ContactMobileNo { get; set; }

}
}
1 change: 1 addition & 0 deletions shesha-core/src/Shesha.Framework/Domain/MobileDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace Shesha.Domain
/// Registered mobile device. Is used to restrict access and identify
/// </summary>
[Entity(GenerateApplicationService = GenerateApplicationServiceState.DisableGenerateApplicationService)]
[Discriminator]
public class MobileDevice: FullAuditedEntity<Guid>
{
/// <summary>
Expand Down
16 changes: 16 additions & 0 deletions shesha-core/src/Shesha.Framework/Migrations/M20230920125900.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using FluentMigrator;
using Shesha.FluentMigrator;

namespace Shesha.Migrations
{
[Migration(20230920125900)]
public class M20230920125900 : OneWayMigration
{
public override void Up()
{
Alter.Table("Core_Accounts").AddColumn("ContactEmail").AsString().Nullable();
Alter.Table("Core_Accounts").AddColumn("ContactMobileNo").AsInt64().Nullable();

}
}
}
15 changes: 15 additions & 0 deletions shesha-core/src/Shesha.Framework/Migrations/M20231031153500.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using FluentMigrator;
using Shesha.FluentMigrator;

namespace Shesha.Migrations
{
[Migration(20231031153500)]
public class M20231031153500 : OneWayMigration
{
public override void Up()
{
Alter.Table("Frwk_MobileDevices").AddColumn("Frwk_Discriminator").AsString().WithDefaultValue("");

}
}
}
3 changes: 2 additions & 1 deletion shesha-core/src/Shesha.Web.Host/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"ConnectionStrings": {
//"Default": "Data Source=localhost,1401;Initial Catalog=Shesha;User ID=sa;password=<YourNewStrong!Passw0rd>s;MultipleActiveResultSets=True",
"Default": "Data Source=MSI; Initial Catalog=pd-UtilityManagement-Test-20230912; Integrated Security=SSPI;"
//"Default": "Data Source=MSI; Initial Catalog=pd-UtilityManagement-Test-20230912; Integrated Security=SSPI;",
"Default": "Data Source=LAPTOP-G8U4C24U\\SQLEXPRESS;Initial Catalog=WaterDataBase; Integrated Security=SSPI; MultipleActiveResultSets=True"
},
"App": {
"ServerRootAddress": "http://sheshacore-demo.boxfusion.co.za",
Expand Down