protected HozaruUserMap() : base("Users") { //Map(x => x.TenantId); Map(x => x.UserName); Map(x => x.Name); Map(x => x.Surname); Map(x => x.FirstName); Map(x => x.LastName); Map(x => x.EmailAddress); Map(x => x.IsEmailConfirmed); Map(x => x.EmailConfirmationCode); Map(x => x.Password); Map(x => x.PasswordResetCode); Map(x => x.LastLoginTime); Map(x => x.IsActive); Map(x => x.AuthenticationSource); //HasMany(i => i.Roles) // .Cascade.AllDeleteOrphan() // .Inverse() // .KeyColumn("UserId") // .ForeignKeyConstraintName("fk_roles_user"); HasOne <UserRole>(i => i.Role).Cascade.All(); this.MapFullAudited(); Polymorphism.Explicit(); }
protected AbpUserMap() : base("AbpUsers") { Map(x => x.TenantId); Map(x => x.UserName); Map(x => x.Name); Map(x => x.Surname); Map(x => x.EmailAddress); Map(x => x.IsEmailConfirmed); Map(x => x.EmailConfirmationCode); Map(x => x.Password); Map(x => x.PasswordResetCode); Map(x => x.LastLoginTime); Map(x => x.IsActive); Map(x => x.AuthenticationSource); Map(x => x.IsLockoutEnabled); Map(x => x.LockoutEndDateUtc); Map(x => x.AccessFailedCount); Map(x => x.PhoneNumber); Map(x => x.IsPhoneNumberConfirmed); Map(x => x.SecurityStamp); Map(x => x.IsTwoFactorEnabled); this.MapFullAudited(); Polymorphism.Explicit(); }
protected TenantMapBase() : base("AbpTenants") { Map(x => x.Name); Map(x => x.CreationTime); Polymorphism.Explicit(); }
/// <summary> /// Constructor. /// </summary> protected TenantMap() : base("AbpTenants") { Map(x => x.TenancyName); Map(x => x.Name); this.MapAudited(); Polymorphism.Explicit(); }
protected RoleMapBase() : base("AbpRoles") { Map(x => x.Name); Map(x => x.DisplayName); HasMany(x => x.Permissions).KeyColumn("RoleId"); this.MapAudited(); Polymorphism.Explicit(); }
protected RoleMap() : base("AbpRoles") { Map(x => x.TenantId); Map(x => x.Name); Map(x => x.DisplayName); this.MapAudited(); Polymorphism.Explicit(); }
/// <summary> /// Constructor. /// </summary> protected AbpRoleMap() : base("AbpRoles") { Map(x => x.TenantId); Map(x => x.Name); Map(x => x.DisplayName); Map(x => x.IsStatic); Map(x => x.IsDefault); this.MapFullAudited(); Polymorphism.Explicit(); }
/// <summary> /// Constructor. /// </summary> protected HozaruTenantMap() : base("Tenants") { References(x => x.Edition).Column("EditionId").Nullable(); Map(x => x.TenancyName); Map(x => x.Name); Map(x => x.IsActive); this.MapFullAudited(); Polymorphism.Explicit(); }
/// <summary> /// Constructor. /// </summary> protected AbpRoleMap() : base("AbpRoles") { References(x => x.Tenant).Column("TenantId").Nullable(); Map(x => x.Name); Map(x => x.DisplayName); Map(x => x.IsStatic); Map(x => x.IsDefault); this.MapFullAudited(); Polymorphism.Explicit(); }
protected UserMapBase() : base("AbpUsers") { Map(x => x.TenantId); Map(x => x.UserName); Map(x => x.Name); Map(x => x.Surname); Map(x => x.EmailAddress); Map(x => x.IsEmailConfirmed); Map(x => x.EmailConfirmationCode); Map(x => x.Password); Map(x => x.PasswordResetCode); Polymorphism.Explicit(); }
public TenantMap() : base("Tenants") { References(x => x.Edition).Column("EditionId").Nullable(); Map(x => x.WhatsappNumber); Map(x => x.TenancyName); Map(x => x.Name); Map(x => x.IsActive); Map(x => x.Address); Map(x => x.Phone); Map(x => x.ExternalDomain); References(i => i.District).Column("District_Id").Index("tenant_district_id"); this.MapFullAudited(); Polymorphism.Explicit(); }
protected UserMap() : base("AbpUsers") { Map(x => x.TenantId); Map(x => x.UserName); Map(x => x.Name); Map(x => x.Surname); Map(x => x.EmailAddress); Map(x => x.IsEmailConfirmed); Map(x => x.EmailConfirmationCode); Map(x => x.Password); Map(x => x.PasswordResetCode); Map(x => x.LastLoginTime); Map(x => x.IsActive); this.MapFullAudited(); Polymorphism.Explicit(); }
public JobBaseMap() { Table(TableName); //the column used to identify extended class key DiscriminateSubClassesOnColumn("JTF"); //Job Type Filter //specifies lazy loading LazyLoad(); //set polymorph Polymorphism.Explicit(); //persistent fields Id(x => x.Id) .GeneratedBy .Identity(); //audit fields Map(x => x.CreatedDate); Map(x => x.CreatedBy); Map(x => x.ModifiedDate); Map(x => x.ModifiedBy); //default properties needed to create an appointment Map(x => x.ExtRefId); Map(x => x.StartDate); Map(x => x.EndDate); Map(x => x.StatusKey); Map(x => x.LabelKey); Map(x => x.LineOfWork); Map(x => x.Description); Map(x => x.Location); Map(x => x.TargetDate); Map(x => x.Priority); //integration properties Map(x => x.ProgressStatus); Map(x => x.CompletionDate); Map(x => x.IntegrationStatus); Map(x => x.IntegrationDate); Map(x => x.IntegrationMessage); //reference to the operative/resource that owns this job. //References(x => x.Resource).Cascade.SaveUpdate(); }
public TrainingSetClassMap() { Id(x => x.Id).GeneratedBy.GuidComb(); Polymorphism.Explicit(); Map(x => x.Title).Not.Nullable(); Map(x => x.Description); Map(x => x.Created); Map(x => x.CreatedBy); Map(x => x.Modified); Map(x => x.ModifiedBy); Map(x => x.ImageUri).CustomType <UriType>(); Map(x => x.StreamUri).CustomType <UriType>().Not.Nullable(); Map(x => x.Duration); Map(x => x.Credits); Map(x => x.RideCredits); Map(x => x.IsPublic); References(x => x.VideoMetadata).Cascade.SaveUpdate().Not.LazyLoad(); References(x => x.TelemetryInfo).Cascade.SaveUpdate().Not.LazyLoad(); References(x => x.EffortType).Not.LazyLoad(); HasMany(x => x.Intervals).Cascade.AllDeleteOrphan().Not.LazyLoad().OrderBy("Sequence").KeyColumn("TrainingSet"); HasMany(x => x.VideoText).Cascade.AllDeleteOrphan().Not.LazyLoad().KeyColumn("TrainingSet"); }
public VideoClassMap() { Id(x => x.Id).GeneratedBy.GuidComb(); Polymorphism.Explicit(); Map(x => x.Title).Not.Nullable(); Map(x => x.Description).Length(2000); Map(x => x.Created); Map(x => x.CreatedBy); Map(x => x.Modified); Map(x => x.ModifiedBy); Map(x => x.ImageUri).CustomType <UriType>(); Map(x => x.StreamUri).CustomType <UriType>().Not.Nullable(); Map(x => x.Duration); Map(x => x.Credits); Map(x => x.RideCredits); References(x => x.Catalog).Column("Catalog").Not.LazyLoad(); References(x => x.VideoMetadata).Cascade.SaveUpdate().Not.LazyLoad(); References(x => x.TelemetryInfo).Cascade.SaveUpdate().Not.LazyLoad(); HasMany(x => x.Reviews).KeyColumn("Video").Cascade.SaveUpdate().Fetch.Subselect().LazyLoad(); HasMany(x => x.VideoText).Cascade.AllDeleteOrphan().Not.LazyLoad().KeyColumn("Video"); HasMany(x => x.Intervals).Cascade.AllDeleteOrphan().Not.LazyLoad().KeyColumn("Video").OrderBy("Sequence"); }
public AvisCodeMap() { Polymorphism.Explicit(); // ... your other mappings here, if needed ... }
/// <summary>Initializes a new instance of the <see cref="NodeMap"/> class.</summary> public NodeMap() { Table("Node"); OptimisticLock.None(); Polymorphism.Explicit(); Id(x => x.Id) .Access.CamelCaseField(Prefix.Underscore) .Column("Id") .GeneratedBy.Custom <GuidCombUriGenerator>(); Map(x => x.DateCreated).Access.CamelCaseField(Prefix.Underscore).Not.Nullable(); Map(x => x.IsDisabled).Access.CamelCaseField(Prefix.Underscore) .Not.Nullable() .Index(this.GenerateIndexName(x => x.IsDisabled)); HasMany(x => x.IncomingRelationCaches) .Access.CamelCaseField(Prefix.Underscore) //.Cascade.AllDeleteOrphan().ForeignKeyCascadeOnDelete() .Cascade.MergeSaveAllDeleteOrphan() //.ForeignKeyCascadeOnDelete() //.Cascade.All() //.Cascade.Merge() .Fetch.Select() .AsSet() .Inverse() .BatchSize(20) .LazyLoad() .Key(x => { x.Column("EndNodeId"); x.ForeignKey(this.GenerateFkName(y => y.IncomingRelationCaches)); }) .Cache.IncludeAll().ReadWrite(); HasMany(x => x.IncomingRelations) .Access.CamelCaseField(Prefix.Underscore) //.Cascade.AllDeleteOrphan().ForeignKeyCascadeOnDelete() .Cascade.MergeSaveAllDeleteOrphan() //.ForeignKeyCascadeOnDelete() //.Cascade.All() //.Cascade.Merge() .Fetch.Select() .AsSet() .Inverse() .BatchSize(20) .LazyLoad() .Key(x => { x.Column("EndNodeId"); x.ForeignKey(this.GenerateFkName(y => y.IncomingRelations)); }) ; //.Cache.IncludeAll().ReadWrite(); This was disabled 27/Sep by APN to resolve an issue where new published items are not routable HasMany(x => x.OutgoingRelationCaches) .Access.CamelCaseField(Prefix.Underscore) //.Cascade.AllDeleteOrphan().ForeignKeyCascadeOnDelete() .Cascade.MergeSaveAllDeleteOrphan() //.ForeignKeyCascadeOnDelete() //.Cascade.All() //.Cascade.Merge() .Fetch.Select() .AsSet() .Inverse() .BatchSize(20) .LazyLoad() .Key(x => { x.Column("StartNodeId"); x.ForeignKey(this.GenerateFkName(y => y.OutgoingRelationCaches)); }) .Cache.IncludeAll().ReadWrite(); HasMany(x => x.OutgoingRelations) .Access.CamelCaseField(Prefix.Underscore) //.Cascade.AllDeleteOrphan().ForeignKeyCascadeOnDelete() .Cascade.MergeSaveAllDeleteOrphan() //.ForeignKeyCascadeOnDelete() //.Cascade.All() //.Cascade.Merge() .Fetch.Select() .AsSet() .Inverse() .BatchSize(20) .LazyLoad() .Key(x => { x.Column("StartNodeId"); x.ForeignKey(this.GenerateFkName(y => y.OutgoingRelations)); }) ; //.Cache.IncludeAll().ReadWrite(); This was disabled 27/Sep by APN to resolve an issue where new published items are not routable HasMany(x => x.NodeVersions) .Access.Property() .Cascade.MergeSaveAllDeleteOrphan() //.ForeignKeyCascadeOnDelete() .Fetch.Select() .AsSet() .Inverse() .BatchSize(20) .LazyLoad() .Key(x => { x.Column("NodeId"); x.ForeignKey(this.GenerateFkName(y => y.NodeVersions)); }) .Cache.IncludeAll().ReadWrite(); AdditionalMappingInfo(); }