Esempio n. 1
0
 public RoleMapping()
 {
     Table("`role`");
     Schema("witu");
     Id(x => x.Id, "id")
     .GeneratedBy.Native();
     OptimisticLock.Version();
     Map(x => x.RequiresAccessScope, "requiresAccessScope").CustomType <BoolAsTinyInt>();
     Map(x => x.CanCreate, "canCreate").CustomType <BoolAsTinyInt>();
     Map(x => x.CanDelete, "canDelete").CustomType <BoolAsTinyInt>();
     Map(x => x.CanUpdate, "canUpdate").CustomType <BoolAsTinyInt>();
     Map(x => x.CanRead, "canRead").CustomType <BoolAsTinyInt>();
     Map(x => x.Type, "type");
     References(x => x.Service)
     .Class(typeof(Service))
     .Column("serviceId")
     .Fetch.Select()
     .Cascade.All();
     HasMany(x => x.UserRoles)
     .KeyColumn("roleId")
     .Inverse()
     .Cascade.All()
     .Fetch.Select()
     .AsSet();
     //Cache.ReadWrite();
 }
Esempio n. 2
0
 public SyllabusMapping()
 {
     Table("`syllabus`");
     Schema("witu");
     Id(x => x.Id, "id")
     .GeneratedBy.Native();
     OptimisticLock.Version();
     Map(x => x.Title, "title");
     Map(x => x.Week, "week");
     Map(x => x.Overview, "overview");
     Map(x => x.Graded, "graded");
     References(x => x.Course)
     .Class(typeof(Course))
     .Not.Nullable()
     .Column("courseId")
     .Fetch.Select()
     .Cascade.All();
     HasMany(x => x.SyllabusAttachments)
     .KeyColumn("syllabusId")
     .Inverse()
     .Cascade.All()
     .Fetch.Select()
     .AsSet();
     Cache.ReadWrite();
 }
Esempio n. 3
0
 public UserRoleMapping()
 {
     Table("`user_role`");
     Schema("witu");
     Id(x => x.Id, "id")
     .GeneratedBy.Native();
     OptimisticLock.Version();
     References(x => x.User)
     .Class(typeof(User))
     .Not.Nullable()
     .Column("userId")
     .Fetch.Select()
     .Cascade.All();
     References(x => x.Role)
     .Class(typeof(Role))
     .Not.Nullable()
     .Column("roleId")
     .Fetch.Select()
     .Cascade.All();
     References(x => x.AccessRole)
     .Class(typeof(AccessRole))
     .Column("accessRoleId")
     .Fetch.Select()
     .Cascade.All();
     //Cache.ReadWrite();
 }
Esempio n. 4
0
        public StudentMapper()
        {
            Table("STUDENT");

            OptimisticLock.None();

            DynamicUpdate();
            Id(it => it.StudentId, "STUDENT_ID").GeneratedBy.Native("STUDENT_SEQ").Index("PK_STUDENT").CustomSqlType("int");
            HasManyToMany(x => x.Classrooms)
            .ParentKeyColumns.Add("STUDENT_ID", p => p.UniqueKey("PK_STUDENT_CLASSROOM"))
            .Table("STUDENT_CLASSROOM")
            .ChildKeyColumns.Add("CLASSROOM_ID", p => p.UniqueKey("PK_STUDENT_CLASSROOM"))
            .ForeignKeyConstraintNames("FK_STUDENT_TO_STUDENT_CLASSROOM", "FK_CLASSROOM_TO_STUDENT_CLASSROOM")
            //.LazyLoad()
            //.Fetch.Select()
            .Not.LazyLoad()
            .Fetch.Join()
            .AsBag();
            References(x => x.Language)
            .ForeignKey("FK_LANGUAGE_TO_STUDENT")
            .Columns("LANGUAGE_ID")
            .Fetch.Join()
            .Cascade.None();
            Map(it => it.FullName, "FULL_NAME").Not.Nullable().CustomSqlType("VARCHAR(300)");
            this.CompleteMappings();
        }
Esempio n. 5
0
 public InformationDeskMapping()
 {
     Table("`information_desk`");
     Schema("witu");
     Id(x => x.Id, "id")
     .GeneratedBy.Native();
     OptimisticLock.Version();
     Map(x => x.Content, "content");
     Map(x => x.CreatedOn, "createdOn");
     Map(x => x.DateOfEvent, "dateOfEvent");
     Map(x => x.DefaultImageFileName, "defaultImageFileName");
     Map(x => x.ShortDescription, "shortDescription");
     Map(x => x.ShowEndDate, "showEndDate");
     Map(x => x.ShowStartDate, "showStartDate");
     Map(x => x.Title, "title");
     Map(x => x.Type, "type");
     HasMany(x => x.InformationDeskAttachments)
     .KeyColumn("InformationDeskId")
     .Inverse()
     .Cascade.All()
     .Fetch.Select()
     .AsSet();
     HasMany(x => x.InformationDeskTargets)
     .KeyColumn("informationDeskId")
     .Inverse()
     .Cascade.All()
     .Fetch.Select()
     .AsSet();
     References(x => x.User)
     .Class(typeof(User))
     .Column("userId")
     .Fetch.Select()
     .Cascade.All();
     Cache.ReadWrite();
 }
Esempio n. 6
0
        public SuppliersMapper()
        {
            Table("Suppliers");

            OptimisticLock.None();

            DynamicUpdate();
            Id(it => it.SupplierID, "SupplierID").GeneratedBy.Native("Suppliers_SEQ").CustomSqlType("int");
            Map(it => it.Address, "Address").Nullable().CustomSqlType("nvarchar(60)").Length(60);
            Map(it => it.City, "City").Nullable().CustomSqlType("nvarchar(15)").Length(15);
            Map(it => it.CompanyName, "CompanyName").Not.Nullable().CustomSqlType("nvarchar(40)").Length(40);
            Map(it => it.ContactName, "ContactName").Nullable().CustomSqlType("nvarchar(30)").Length(30);
            Map(it => it.ContactTitle, "ContactTitle").Nullable().CustomSqlType("nvarchar(30)").Length(30);
            Map(it => it.Country, "Country").Nullable().CustomSqlType("nvarchar(15)").Length(15);
            Map(it => it.Fax, "Fax").Nullable().CustomSqlType("nvarchar(24)").Length(24);
            Map(it => it.HomePage, "HomePage").Nullable().CustomSqlType("ntext").Length(1073741823);
            Map(it => it.Phone, "Phone").Nullable().CustomSqlType("nvarchar(24)").Length(24);
            Map(it => it.PostalCode, "PostalCode").Nullable().CustomSqlType("nvarchar(10)").Length(10);
            HasMany(x => x.Productss)
            .KeyColumns.Add("SupplierID")
            .ForeignKeyConstraintName("FK_Products_Suppliers")
            .Inverse()
            .Cascade.Delete()
            .LazyLoad()
            .Fetch.Select()
            .AsBag();
            Map(it => it.Region, "Region").Nullable().CustomSqlType("nvarchar(15)").Length(15);
            this.CompleteMappings();
        }
Esempio n. 7
0
        /// <summary>Initializes a new instance of the <see cref="AttributeLongStringValueMap"/> class.</summary>
        public AttributeLongStringValueMap()
        {
            Table("AttributeLongStringValue");
            OptimisticLock.None();

            Id(x => x.Id)
            .Access.CamelCaseField(Prefix.Underscore)
            .Column("Id")
            .GeneratedBy.Custom <GuidCombUriGenerator>();

            Map(x => x.Value).CustomType("StringClob").Access.CamelCaseField(Prefix.Underscore);

            Map(x => x.ValueKey).Access.CamelCaseField(Prefix.Underscore)
            .Not.Nullable()
            .Index(this.GenerateIndexName(x => x.ValueKey));

            References(x => x.Attribute)
            .Access.CamelCaseField(Prefix.Underscore)
            .Cascade.Merge()
            .Fetch.Select()
            .Not.Nullable()
            .Index(this.GenerateIndexName(x => x.Attribute))
            .Column("AttributeId");

            References(x => x.Locale)
            .Access.CamelCaseField(Prefix.Underscore)
            .Cascade.Merge()     // TODO: This should be SaveUpdate() but need to fix mapping code
            .Fetch.Select()
            .Not.Nullable()
            .Index(this.GenerateIndexName(x => x.Locale))
            .Column("LocaleId");

            AdditionalMappingInfo();
        }
        /// <summary>Initializes a new instance of the <see cref="NodeVersionStatusHistoryMap"/> class.</summary>
        public NodeVersionStatusHistoryMap()
        {
            Table("NodeVersionStatusHistory");
            OptimisticLock.None();

            Id(x => x.Id)
            .Access.CamelCaseField(Prefix.Underscore)
            .Column("Id")
            .GeneratedBy.Custom <GuidCombUriGenerator>();

            Map(x => x.Date).Access.CamelCaseField(Prefix.Underscore)
            .Not.Nullable()
            .Index(this.GenerateIndexName(x => x.Date));

            References(x => x.NodeVersion)
            .Access.CamelCaseField(Prefix.Underscore)
            .Cascade.Merge()
            .Not.Nullable()
            .Fetch.Select()
            .LazyLoad()             // Reverse navigator so lazy-load
            .Column("NodeVersionId")
            .Index(this.GenerateIndexName(x => x.NodeVersionStatusType));

            References(x => x.NodeVersionStatusType)
            .Access.CamelCaseField(Prefix.Underscore)
            .Cascade.Merge()
            .Not.Nullable()
            .Fetch.Select()
            .Column("NodeVersionStatusTypeId")
            .Index(this.GenerateIndexName(x => x.NodeVersionStatusType));

            AdditionalMappingInfo();
        }
Esempio n. 9
0
        public RouteListMap()
        {
            Table("route_lists");

            OptimisticLock.Version();
            Version(x => x.Version)
            .Column("version");

            Id(x => x.Id).Column("id").GeneratedBy.Native();

            Map(x => x.ConfirmedDistance).Column("confirmed_distance");
            Map(x => x.Date).Column("date");
            Map(x => x.Status).Column("status").CustomType <RouteListStatusStringType> ();
            Map(x => x.ClosingDate).Column("closing_date");
            Map(x => x.ClosingComment).Column("closing_comment");
            Map(x => x.LogisticiansComment).Column("logisticians_comment");
            Map(x => x.ClosingFilled).Column("closing_filled");
            Map(x => x.LastCallTime).Column("last_call_time");
            Map(x => x.DifferencesConfirmed).Column("differences_confirmed");
            Map(x => x.IsManualAccounting).Column("is_manual_accounting");
            Map(x => x.OnLoadTimeStart).Column("on_load_start").CustomType <TimeAsTimeSpanType>();
            Map(x => x.OnLoadTimeEnd).Column("on_load_end").CustomType <TimeAsTimeSpanType>();
            Map(x => x.OnLoadGate).Column("on_load_gate");
            Map(x => x.OnloadTimeFixed).Column("on_load_time_fixed");
            Map(x => x.PlanedDistance).Column("plan_distance");
            Map(x => x.Printed).Column("printed");
            Map(x => x.AddressesOrderWasChangedAfterPrinted).Column("addresses_order_was_changed_after_printed");
            Map(x => x.RecalculatedDistance).Column("recalculated_distance");
            Map(x => x.MileageComment).Column("mileage_comment");
            Map(x => x.MileageCheck).Column("mileage_check");
            Map(x => x.NormalWage).Column("normal_wage");
            Map(x => x.FixedDriverWage).Column("fixed_driver_wage");
            Map(x => x.FixedForwarderWage).Column("fixed_forwarder_wage");
            Map(x => x.NotFullyLoaded).Column("not_fully_loaded");
            Map(x => x.CashierReviewComment).Column("cashier_review_comment");
            Map(x => x.WasAcceptedByCashier).Column("was_accepted_by_cashier");

            References(x => x.Car).Column("car_id");
            References(x => x.Shift).Column("delivery_shift_id");
            References(x => x.Driver).Column("driver_id");
            References(x => x.Forwarder).Column("forwarder_id");
            References(x => x.Logistician).Column("logistican_id");
            References(x => x.BottleFine).Column("bottles_fine_id");
            References(x => x.Cashier).Column("cashier_id");
            References(x => x.FuelOutlayedOperation).Column("fuel_outlayed_operation_id").Cascade.All();
            References(x => x.DriverWageOperation).Column("driver_wages_movement_operations_id");
            References(x => x.ForwarderWageOperation).Column("forwarder_wages_movement_operations_id");
            References(x => x.ClosedBy).Column("closed_by_employee_id");
            References(x => x.ClosingSubdivision).Column("closing_subdivision_id");
            References(x => x.LogisticiansCommentAuthor).Column("logisticians_comment_author_id");

            HasMany(x => x.Addresses).Cascade.AllDeleteOrphan().Inverse()
            .KeyColumn("route_list_id")
            .AsList(x => x.Column("order_in_route"));
            HasMany(x => x.FuelDocuments).Cascade.AllDeleteOrphan().Inverse().LazyLoad().KeyColumn("route_list_id");
            HasManyToMany(x => x.GeographicGroups).Table("geographic_groups_to_entities")
            .ParentKeyColumn("route_list_id")
            .ChildKeyColumn("geographic_group_id")
            .LazyLoad();
        }
Esempio n. 10
0
 public DistrictMapping()
 {
     Table("`district`");
     Schema("witu");
     Id(x => x.Id, "id")
     .GeneratedBy.Native();
     OptimisticLock.Version();
     Map(x => x.Code, "code");
     Map(x => x.CreatedOn, "createdOn");
     Map(x => x.LastModified, "lastModified");
     Map(x => x.Name, "name");
     HasMany(x => x.Counties)
     .KeyColumn("districtId")
     .Inverse()
     .Cascade.All()
     .Fetch.Select()
     .AsSet();
     HasMany(x => x.People)
     .KeyColumn("districtOfBirthId")
     .Inverse()
     .Cascade.All()
     .Fetch.Select()
     .AsSet();
     HasMany(x => x.People1)
     .KeyColumn("districtOfResidenceId")
     .Inverse()
     .Cascade.All()
     .Fetch.Select()
     .AsSet();
     Cache.ReadOnly();
 }
Esempio n. 11
0
 public GeneralInformationMapping()
 {
     Table("`general_information`");
     Schema("witu");
     Id(x => x.Id, "id")
     .GeneratedBy.Native();
     OptimisticLock.Version();
     Map(x => x.Content, "content");
     Map(x => x.CreatedOn, "createdOn");
     Map(x => x.DefaultImageFilelName, "defaultImageFilelName");
     Map(x => x.ShortDescription, "shortDescription");
     Map(x => x.Title, "title");
     References(x => x.User)
     .Class(typeof(User))
     .Column("userId")
     .Fetch.Select()
     .Cascade.All();
     HasMany(x => x.GeneralInformationAttachments)
     .KeyColumn("generalInformationId")
     .Inverse()
     .Cascade.All()
     .Fetch.Select()
     .AsSet();
     Cache.ReadWrite();
 }
        /// <summary>Initializes a new instance of the <see cref="NodeRelationTagMap"/> class.</summary>
        public NodeRelationTagMap()
        {
            Table("NodeRelationTag");
            OptimisticLock.None();

            Id(x => x.Id)
            .Access.CamelCaseField(Prefix.Underscore)
            .Column("Id")
            .GeneratedBy.Custom <GuidCombUriGenerator>();

            Map(x => x.Name).Access.CamelCaseField(Prefix.Underscore)
            .Not.Nullable()
            .Length(64)
            .Index(this.GenerateIndexName(x => x.Name));

            Map(x => x.Value).Access.CamelCaseField(Prefix.Underscore)
            .Index(this.GenerateIndexName(x => x.Value));

            References(x => x.NodeRelation)
            .Access.CamelCaseField(Prefix.Underscore)
            .Cascade.Merge()
            .Not.Nullable()
            .Fetch.Select()
            .LazyLoad()
            .Column("NodeRelationId")
            .Index(this.GenerateIndexName(x => x.NodeRelation));

            AdditionalMappingInfo();
        }
Esempio n. 13
0
 public CampusMapping()
 {
     Table("`campus`");
     Schema("witu");
     Id(x => x.Id, "id")
     .GeneratedBy.Native();
     OptimisticLock.Version();
     Map(x => x.Code, "code");
     Map(x => x.Description, "description");
     Map(x => x.Name, "name");
     Map(x => x.ShortName, "shortName");
     //HasMany(x => x.Programs)
     //	.KeyColumn("campusId")
     //	.Inverse()
     //	.Cascade.All()
     //	.Fetch.Select()
     //	.AsSet();
     References(x => x.Institution)
     .Class(typeof(Institution))
     .Not.Nullable()
     .Column("instituteId")
     .Fetch.Select()
     .Cascade.All();
     Cache.ReadWrite();
 }
Esempio n. 14
0
        public CustomersMapper()
        {
            Table("Customers");

            OptimisticLock.None();

            DynamicUpdate();
            Id(it => it.CustomerID, "CustomerID").GeneratedBy.Assigned().CustomSqlType("nchar(5)").Length(5);
            Map(it => it.Address, "Address").Nullable().CustomSqlType("nvarchar(60)").Length(60);
            Map(it => it.City, "City").Nullable().CustomSqlType("nvarchar(15)").Length(15);
            Map(it => it.CompanyName, "CompanyName").Not.Nullable().CustomSqlType("nvarchar(40)").Length(40);
            Map(it => it.ContactName, "ContactName").Nullable().CustomSqlType("nvarchar(30)").Length(30);
            Map(it => it.ContactTitle, "ContactTitle").Nullable().CustomSqlType("nvarchar(30)").Length(30);
            Map(it => it.Country, "Country").Nullable().CustomSqlType("nvarchar(15)").Length(15);
            Map(it => it.Fax, "Fax").Nullable().CustomSqlType("nvarchar(24)").Length(24);
            HasMany(x => x.Orderss)
            .KeyColumns.Add("CustomerID")
            .ForeignKeyConstraintName("FK_Orders_Customers")
            .Inverse()
            .Cascade.Delete()
            .LazyLoad()
            .Fetch.Select()
            .AsBag();
            Map(it => it.Phone, "Phone").Nullable().CustomSqlType("nvarchar(24)").Length(24);
            Map(it => it.PostalCode, "PostalCode").Nullable().CustomSqlType("nvarchar(10)").Length(10);
            Map(it => it.Region, "Region").Nullable().CustomSqlType("nvarchar(15)").Length(15);
            this.CompleteMappings();
        }
Esempio n. 15
0
        public ProductsMapper()
        {
            Table("Products");

            OptimisticLock.None();

            DynamicUpdate();
            Id(it => it.ProductID, "ProductID").GeneratedBy.Native("Products_SEQ").CustomSqlType("int");
            References(x => x.Categories)
            .ForeignKey("FK_Products_Categories")
            .Columns("CategoryID")
            .Fetch.Join()
            .Cascade.None();
            Map(it => it.Discontinued, "Discontinued").Not.Nullable().CustomSqlType("bit");
            HasMany(x => x.OrderDetailss)
            .KeyColumns.Add("ProductID")
            .ForeignKeyConstraintName("FK_Order_Details_Products")
            .Inverse()
            .Cascade.Delete()
            .LazyLoad()
            .Fetch.Select()
            .AsBag();
            Map(it => it.ProductName, "ProductName").Not.Nullable().CustomSqlType("nvarchar(40)").Length(40);
            Map(it => it.QuantityPerUnit, "QuantityPerUnit").Nullable().CustomSqlType("nvarchar(20)").Length(20);
            Map(it => it.ReorderLevel, "ReorderLevel").Nullable().CustomSqlType("smallint");
            References(x => x.Suppliers)
            .ForeignKey("FK_Products_Suppliers")
            .Columns("SupplierID")
            .Fetch.Join()
            .Cascade.None();
            Map(it => it.UnitPrice, "UnitPrice").Nullable().CustomSqlType("money");
            Map(it => it.UnitsInStock, "UnitsInStock").Nullable().CustomSqlType("smallint");
            Map(it => it.UnitsOnOrder, "UnitsOnOrder").Nullable().CustomSqlType("smallint");
            this.CompleteMappings();
        }
Esempio n. 16
0
 public CategoryMap()
 {
     Table("Categories");
     Id(x => x.Id).Column("Id").GeneratedBy.Native();
     Map(x => x.Name).Column("Name").Length(20).Not.Nullable();
     OptimisticLock.Version();
     Version(x => x.Version).Column("Version").Not.Nullable();
 }
 public ArtistMap()
 {
     Table("Artists");
     OptimisticLock.Dirty();
     DynamicUpdate();
     Id(x => x.Id).Column("ArtistId");
     Map(x => x.Name);
     HasMany(x => x.Albums).Inverse().Cascade.All();
 }
Esempio n. 18
0
        public EntityMap()
        {
            Id(x => x.Id);
            OptimisticLock.Version();
            Version(x => x.Version)
            .CustomType("Timestamp");

            Map(x => x.Created).Not.Nullable();
        }
Esempio n. 19
0
 public EmployeeMap()
 {
     Id(x => x.Id);
     Map(x => x.FirstName);
     Map(x => x.LastName);
     References(x => x.Store);
     OptimisticLock.All();
     DynamicUpdate();
 }
Esempio n. 20
0
 public ItemMap()
 {
     Table("Items");
     Id(x => x.Id).Column("Id").GeneratedBy.Native();
     Map(x => x.Name).Column("Name").Length(20).Not.Nullable();
     OptimisticLock.Version();
     Version(x => x.Version).Column("Version").Not.Nullable();
     References(x => x.Category).Column("CategoryId").Not.Nullable().Cascade.None().ForeignKey();
 }
Esempio n. 21
0
 public GenreMap()
 {
     Table("Genres");
     OptimisticLock.Dirty();
     DynamicUpdate();
     Id(x => x.Id).Column("GenreId");
     Map(x => x.Name);
     Map(x => x.Description);
     HasMany(x => x.Albums).KeyColumn("GenreId").Inverse().Cascade.All();
 }
Esempio n. 22
0
        public CounterMap()
        {
            OptimisticLock.Dirty();
            DynamicUpdate();

            Id(x => x.Id).GeneratedBy.Identity().Unique();
            Map(x => x.NumberId).Not.Nullable();
            Map(x => x.Current).Not.Nullable().OptimisticLock();
            Map(x => x.Parameter1).Nullable();
        }
Esempio n. 23
0
        public CompanyMap()
        {
            Table("[dbo].[companies]");
            OptimisticLock.None();
            LazyLoad();

            Id(x => x.Id).GeneratedBy.Identity();
            Map(x => x.Name);
            Map(x => x.Category);
            Map(x => x.Symbol);
        }
Esempio n. 24
0
 public RatingMap()
 {
     Table("Ratings");
     Id(x => x.Id).Column("Id").GeneratedBy.Native();
     Map(x => x.Score).Column("Score").Length(1).Not.Nullable();
     Map(x => x.Comment).Column("Comment").Length(100);
     OptimisticLock.Version();
     Version(x => x.Version).Column("Version").Not.Nullable();
     References(x => x.Item).Column("ItemId").Not.Nullable().Cascade.None().ForeignKey();
     References(x => x.User).Column("UserId").Not.Nullable().Cascade.None().ForeignKey();
 }
        public UserMap()
        {
            Table("Users");
            Id(x => x.Id);
            Map(x => x.Name);
            Map(x => x.SurName);

            Version(X => X.EntityVersion);

            OptimisticLock.Version();
        }
        public RouteListItemMap()
        {
            Table("route_list_addresses");

            OptimisticLock.Version();
            Version(x => x.Version).Column("version");

            Id(x => x.Id).Column("id").GeneratedBy.Native();

            Map(x => x.IndexInRoute).Column("order_in_route");
            Map(x => x.BottlesReturned).Column("bottles_returned");
            Map(x => x.DriverBottlesReturned).Column("driver_bottles_returned");
            Map(x => x.OldBottleDepositsCollected).Column("deposits_collected");
            Map(x => x.OldEquipmentDepositsCollected).Column("equipment_deposits_collected");
            Map(x => x.ExtraCash).Column("extra_cash");
            Map(x => x.TotalCash).Column("total_cash");
            Map(x => x.DriverWage).Column("driver_wage");
            Map(x => x.DriverWageSurcharge).Column("driver_wage_surcharge");
            Map(x => x.ForwarderWage).Column("forwarder_wage");
            Map(x => x.WithForwarder).Column("with_forwarder");
            Map(x => x.StatusLastUpdate).Column("status_last_update");
            Map(x => x.Comment).Column("comment").Length(150);
            Map(x => x.Status).Column("status").CustomType <RouteListItemStatusStringType>();
            Map(x => x.NeedToReload).Column("need_to_reload");
            Map(x => x.WasTransfered).Column("was_transfered");
            Map(x => x.CashierComment).Column("cashier_comment");
            Map(x => x.CashierCommentCreateDate).Column("cashier_comment_create_date");
            Map(x => x.CashierCommentLastUpdate).Column("cashier_comment_last_update");
            Map(x => x.Notified30Minutes).Column("notified_30minutes");
            Map(x => x.NotifiedTimeout).Column("notified_timeout");
            Map(x => x.PlanTimeStart).Column("plan_time_start").CustomType <TimeAsTimeSpanType>();
            Map(x => x.PlanTimeEnd).Column("plan_time_end").CustomType <TimeAsTimeSpanType>();
            Map(x => x.CommentForFine).Column("comment_for_fine");
            Map(x => x.IsDriverForeignDistrict).Column("is_driver_foreign_district");

            Map(x => x.CreationDate).Column("creation_date")
            .Insert().Not.Update().Access.ReadOnlyPropertyThroughCamelCaseField(Prefix.Underscore);

            References(x => x.RouteList).Column("route_list_id").Not.Nullable();
            References(x => x.Order).Column("order_id").Cascade.SaveUpdate();
            References(x => x.TransferedTo).Column("transfered_to_id");
            References(x => x.CashierCommentAuthor).Column("cashier_comment_author");
            References(x => x.DriverWageCalculationMethodic).Column("driver_wage_calculation_methodic_id");
            References(x => x.ForwarderWageCalculationMethodic).Column("forwarder_wage_calculation_methodic_id");
            References(x => x.LateArrivalReason).Column("late_arrival_reason_id");
            References(x => x.LateArrivalReasonAuthor).Column("late_arrival_reason_author_id");
            References(x => x.CommentForFineAuthor).Column("comment_for_fine_author_id");

            HasManyToMany(x => x.Fines)
            .Table("fines_to_route_list_addresses")
            .ParentKeyColumn("route_list_address_id")
            .ChildKeyColumn("fine_id")
            .LazyLoad();
        }
Esempio n. 27
0
        public ErfassungsPeriodMapping()
        {
            MapTo(e => e.Name);
            MapTo(e => e.NetzErfassungsmodus, "NetzModus");
            MapTo(e => e.IsClosed, "IstAbgeschl").OptimisticLock();
            MapTo(e => e.Erfassungsjahr, "ErfJahr").OptimisticLock();

            OptimisticLock.Dirty();

            ReferencesTo(b => b.Mandant);
            DynamicUpdate();
        }
Esempio n. 28
0
 public UserMap()
 {
     Table("Users");
     Id(x => x.Id).Column("Id").GeneratedBy.Native();
     Map(x => x.Username).Column("Username").Length(20).Not.Nullable();
     Map(x => x.Firstname).Column("Firstname").Length(50);
     Map(x => x.Lastname).Column("Lastname").Length(50).Not.Nullable();
     Map(x => x.Password).Column("Password").Length(60).Not.Nullable();
     Map(x => x.IsAdmin).Column("IsAdmin").Not.Nullable();
     OptimisticLock.Version();
     Version(x => x.Version).Column("Version").Not.Nullable();
 }
Esempio n. 29
0
 public CartMap()
 {
     Table("Carts");
     OptimisticLock.Dirty();
     DynamicUpdate();
     Id(x => x.Id, "RecordId");
     Map(x => x.CartId);
     Map(x => x.Count);
     Map(x => x.DateCreated);
     Map(x => x.AlbumId);
     References(x => x.Album, "AlbumId").Not.Insert().Not.Update();
 }
Esempio n. 30
0
 public CourseSubjectMap()
 {
     Id(x => x.Id).GeneratedBy.Identity();
     Map(e => e.Name).Not.Nullable().Unique().Length(150);
     //Map(e => e.EnglishName).Not.Nullable().Unique().Length(150).Column("Name_en");
     HasMany(x => x.Translations).Access.CamelCaseField(Prefix.Underscore)
     .Cascade.AllDeleteOrphan()
     .KeyColumn("SubjectId").Inverse().AsSet();
     DynamicUpdate();
     OptimisticLock.Version();
     Version(x => x.Version).CustomSqlType("timestamp").Generated.Always();
 }
Esempio n. 31
0
 public bool Equals(OptimisticLock other)
 {
     return Equals(other.value, value);
 }