@ -0,0 +1,30 @@ | |||
using Abp.Domain.Entities.Auditing; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.ComponentModel.DataAnnotations; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace BCS.BMC.BMC.FirebaseCloudMessages | |||
{ | |||
[Table("FirebaseCloudMessageDetails")] | |||
public class FirebaseCloudMessageDetails : FullAuditedEntity | |||
{ | |||
public const int SenderNameMaxLength = 32; | |||
public const int SenderImageurlMaxLength = 256; | |||
public const int FcmTokenMaxLength = 512; | |||
public int Id { get; set; } | |||
public int UserId { get; set; } | |||
[MaxLength(FcmTokenMaxLength)] | |||
public string FcmToken { get; set; } | |||
[MaxLength(SenderImageurlMaxLength)] | |||
public string SenderImageurl { get; set; } | |||
[MaxLength(SenderNameMaxLength)] | |||
public string SenderName { get; set; } | |||
public DateTime? MessageSentDateTime { get; set; } | |||
public bool Status { get; set; } | |||
public string Message { get; set; } | |||
} | |||
} |
@ -0,0 +1,21 @@ | |||
using Abp.Domain.Entities.Auditing; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.ComponentModel.DataAnnotations; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace BCS.BMC.BMC.FirebaseCloudMessages | |||
{ | |||
[Table("FirebaseToken")] | |||
public class FirebaseToken : FullAuditedEntity | |||
{ | |||
public const int HostNameMaxLength = 512; | |||
public int? UserId { get; set; } | |||
[MaxLength(HostNameMaxLength)] | |||
public string HostName { get; set; } | |||
public string FcmToken { get; set; } | |||
} | |||
} |
@ -0,0 +1,45 @@ | |||
using System; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
#nullable disable | |||
namespace BCS.BMC.Migrations | |||
{ | |||
public partial class FirebaeCloudMessageDetails : Migration | |||
{ | |||
protected override void Up(MigrationBuilder migrationBuilder) | |||
{ | |||
migrationBuilder.CreateTable( | |||
name: "FirebaseCloudMessageDetails", | |||
columns: table => new | |||
{ | |||
Id = table.Column<int>(type: "int", nullable: false) | |||
.Annotation("SqlServer:Identity", "1, 1"), | |||
UserId = table.Column<int>(type: "int", nullable: false), | |||
FcmToken = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), | |||
SenderImageurl = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), | |||
SenderName = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true), | |||
MessageSentDateTime = table.Column<DateTime>(type: "datetime2", nullable: true), | |||
Status = table.Column<bool>(type: "bit", nullable: false), | |||
Message = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), | |||
CreatorUserId = table.Column<long>(type: "bigint", nullable: true), | |||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), | |||
LastModifierUserId = table.Column<long>(type: "bigint", nullable: true), | |||
IsDeleted = table.Column<bool>(type: "bit", nullable: false), | |||
DeleterUserId = table.Column<long>(type: "bigint", nullable: true), | |||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_FirebaseCloudMessageDetails", x => x.Id); | |||
}); | |||
} | |||
protected override void Down(MigrationBuilder migrationBuilder) | |||
{ | |||
migrationBuilder.DropTable( | |||
name: "FirebaseCloudMessageDetails"); | |||
} | |||
} | |||
} |
@ -0,0 +1,41 @@ | |||
using System; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
#nullable disable | |||
namespace BCS.BMC.Migrations | |||
{ | |||
public partial class FirebaseToken : Migration | |||
{ | |||
protected override void Up(MigrationBuilder migrationBuilder) | |||
{ | |||
migrationBuilder.CreateTable( | |||
name: "FirebaseToken", | |||
columns: table => new | |||
{ | |||
Id = table.Column<int>(type: "int", nullable: false) | |||
.Annotation("SqlServer:Identity", "1, 1"), | |||
UserId = table.Column<int>(type: "int", nullable: true), | |||
HostName = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), | |||
FcmToken = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), | |||
CreatorUserId = table.Column<long>(type: "bigint", nullable: true), | |||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), | |||
LastModifierUserId = table.Column<long>(type: "bigint", nullable: true), | |||
IsDeleted = table.Column<bool>(type: "bit", nullable: false), | |||
DeleterUserId = table.Column<long>(type: "bigint", nullable: true), | |||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_FirebaseToken", x => x.Id); | |||
}); | |||
} | |||
protected override void Down(MigrationBuilder migrationBuilder) | |||
{ | |||
migrationBuilder.DropTable( | |||
name: "FirebaseToken"); | |||
} | |||
} | |||
} |
@ -0,0 +1,19 @@ | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
#nullable disable | |||
namespace BCS.BMC.Migrations | |||
{ | |||
public partial class RemoveIdFrom_FirebaseToken : Migration | |||
{ | |||
protected override void Up(MigrationBuilder migrationBuilder) | |||
{ | |||
} | |||
protected override void Down(MigrationBuilder migrationBuilder) | |||
{ | |||
} | |||
} | |||
} |
@ -0,0 +1,21 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.ComponentModel.DataAnnotations; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using BCS.BMC.BMC.CompanyMasters; | |||
using Abp.AutoMapper; | |||
using BCS.BMC.BMC.FirebaseCloudMessages; | |||
namespace BCS.BMC.Models.TokenAuth | |||
{ | |||
[AutoMap(typeof(FirebaseToken))] | |||
public class CreateOrUpdateFireBaseModel | |||
{ | |||
public int? UserId { get; set; } | |||
public string HostName { get; set; } | |||
public string FcmToken { get; set; } | |||
} | |||
} |