diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..779ee709 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,12 @@ +[submodule "Aaru.CommonTypes"] + path = Aaru.CommonTypes + url = https://github.com/Aaru-dps/Aaru.CommonTypes +[submodule "Aaru.Helpers"] + path = Aaru.Helpers + url = https://github.com/Aaru-dps/Aaru.Helpers +[submodule "Aaru.Console"] + path = Aaru.Console + url = https://github.com/Aaru-dps/Aaru.Console +[submodule "CICMMetadata"] + path = CICMMetadata + url = https://github.com/claunia/CICMMetadata diff --git a/.idea/.idea.Marechai/.idea/vcs.xml b/.idea/.idea.Marechai/.idea/vcs.xml index 65db671a..3849cb7f 100644 --- a/.idea/.idea.Marechai/.idea/vcs.xml +++ b/.idea/.idea.Marechai/.idea/vcs.xml @@ -7,5 +7,9 @@ + + + + \ No newline at end of file diff --git a/Aaru.CommonTypes b/Aaru.CommonTypes new file mode 160000 index 00000000..fbb7a2c3 --- /dev/null +++ b/Aaru.CommonTypes @@ -0,0 +1 @@ +Subproject commit fbb7a2c3c0a7dbc97584d432e86551ebb26bf8fa diff --git a/Aaru.Console b/Aaru.Console new file mode 160000 index 00000000..31223302 --- /dev/null +++ b/Aaru.Console @@ -0,0 +1 @@ +Subproject commit 312233024856137df3306e55b25dfba2ccf25530 diff --git a/Aaru.Helpers b/Aaru.Helpers new file mode 160000 index 00000000..f2b5d64d --- /dev/null +++ b/Aaru.Helpers @@ -0,0 +1 @@ +Subproject commit f2b5d64d4ecce7223476483cd8e39280cefbf4e4 diff --git a/CICMMetadata b/CICMMetadata new file mode 160000 index 00000000..c3a8be24 --- /dev/null +++ b/CICMMetadata @@ -0,0 +1 @@ +Subproject commit c3a8be24478245e5f9604df12d082917ef1e66f6 diff --git a/LICENSE.LGPL b/LICENSE.LGPL new file mode 100644 index 00000000..e5ab03e1 --- /dev/null +++ b/LICENSE.LGPL @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/LICENSE.MIT b/LICENSE.MIT new file mode 100644 index 00000000..98dc1fdc --- /dev/null +++ b/LICENSE.MIT @@ -0,0 +1,19 @@ +Copyright (c) 2015-2016 Natalia Portillo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Marechai.Database/Marechai.Database.csproj b/Marechai.Database/Marechai.Database.csproj index 4bcd5628..e9b1543d 100644 --- a/Marechai.Database/Marechai.Database.csproj +++ b/Marechai.Database/Marechai.Database.csproj @@ -10,4 +10,7 @@ + + + \ No newline at end of file diff --git a/Marechai.Database/Migrations/20200611000722_AddMedia.Designer.cs b/Marechai.Database/Migrations/20200611000722_AddMedia.Designer.cs new file mode 100644 index 00000000..16d72d8a --- /dev/null +++ b/Marechai.Database/Migrations/20200611000722_AddMedia.Designer.cs @@ -0,0 +1,4825 @@ +// +using System; +using Marechai.Database.Models; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace Marechai.Database.Migrations +{ + [DbContext(typeof(MarechaiContext))] + [Migration("20200611000722_AddMedia")] + partial class AddMedia + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "3.1.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Marechai.Database.Models.ApplicationRole", b => + { + b.Property("Id") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Created") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Name") + .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasMaxLength(256); + + b.Property("NormalizedName") + .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasName("RoleNameIndex"); + + b.ToTable("AspNetRoles"); + }); + + modelBuilder.Entity("Marechai.Database.Models.ApplicationUser", b => + { + b.Property("Id") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Email") + .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasMaxLength(256); + + b.Property("EmailConfirmed") + .HasColumnType("bit(1)"); + + b.Property("LockoutEnabled") + .HasColumnType("bit(1)"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("NormalizedEmail") + .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasMaxLength(256); + + b.Property("NormalizedUserName") + .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasMaxLength(256); + + b.Property("PasswordHash") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("PhoneNumber") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit(1)"); + + b.Property("SecurityStamp") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("TwoFactorEnabled") + .HasColumnType("bit(1)"); + + b.Property("UserName") + .HasColumnType("varchar(256) CHARACTER SET utf8mb4") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Audit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("AffectedColumns") + .HasColumnType("json"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Keys") + .HasColumnType("json"); + + b.Property("NewValues") + .HasColumnType("json"); + + b.Property("OldValues") + .HasColumnType("json"); + + b.Property("Table") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Type") + .HasColumnType("tinyint unsigned"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("Table"); + + b.HasIndex("Type"); + + b.HasIndex("UserId"); + + b.ToTable("Audit"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Book", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CountryId") + .HasColumnType("smallint(3)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Edition") + .HasColumnType("int"); + + b.Property("Isbn") + .HasColumnType("varchar(13) CHARACTER SET utf8mb4") + .HasMaxLength(13); + + b.Property("NativeTitle") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Pages") + .HasColumnType("smallint"); + + b.Property("PreviousId") + .HasColumnType("bigint"); + + b.Property("Published") + .HasColumnType("datetime(6)"); + + b.Property("SourceId") + .HasColumnType("bigint"); + + b.Property("Synopsis") + .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasMaxLength(262144); + + b.Property("Title") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CountryId"); + + b.HasIndex("Edition"); + + b.HasIndex("Isbn"); + + b.HasIndex("NativeTitle"); + + b.HasIndex("Pages"); + + b.HasIndex("PreviousId") + .IsUnique(); + + b.HasIndex("Published"); + + b.HasIndex("SourceId"); + + b.HasIndex("Synopsis") + .HasAnnotation("MySql:FullTextIndex", true); + + b.HasIndex("Title"); + + b.ToTable("Books"); + }); + + modelBuilder.Entity("Marechai.Database.Models.BooksByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("BookId") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MachineId") + .HasColumnType("int(11)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("BookId"); + + b.HasIndex("MachineId"); + + b.ToTable("BooksByMachines"); + }); + + modelBuilder.Entity("Marechai.Database.Models.BooksByMachineFamily", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("BookId") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MachineFamilyId") + .HasColumnType("int(11)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("BookId"); + + b.HasIndex("MachineFamilyId"); + + b.ToTable("BooksByMachineFamilies"); + }); + + modelBuilder.Entity("Marechai.Database.Models.BrowserTest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Agif") + .ValueGeneratedOnAdd() + .HasColumnName("agif") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Browser") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("browser") + .HasColumnType("varchar(64)") + .HasDefaultValueSql("''") + .HasMaxLength(64); + + b.Property("Colors") + .ValueGeneratedOnAdd() + .HasColumnName("colors") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Flash") + .ValueGeneratedOnAdd() + .HasColumnName("flash") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Frames") + .ValueGeneratedOnAdd() + .HasColumnName("frames") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Gif87") + .ValueGeneratedOnAdd() + .HasColumnName("gif87") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Gif89") + .ValueGeneratedOnAdd() + .HasColumnName("gif89") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Jpeg") + .ValueGeneratedOnAdd() + .HasColumnName("jpeg") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Js") + .ValueGeneratedOnAdd() + .HasColumnName("js") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Os") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("os") + .HasColumnType("varchar(32)") + .HasDefaultValueSql("''") + .HasMaxLength(32); + + b.Property("Platform") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("platform") + .HasColumnType("varchar(8)") + .HasDefaultValueSql("''") + .HasMaxLength(8); + + b.Property("Png") + .ValueGeneratedOnAdd() + .HasColumnName("png") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Pngt") + .ValueGeneratedOnAdd() + .HasColumnName("pngt") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Table") + .ValueGeneratedOnAdd() + .HasColumnName("table") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("UserAgent") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("user_agent") + .HasColumnType("varchar(128)") + .HasDefaultValueSql("''") + .HasMaxLength(128); + + b.Property("Version") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("version") + .HasColumnType("varchar(16)") + .HasDefaultValueSql("''") + .HasMaxLength(16); + + b.HasKey("Id"); + + b.HasIndex("Browser") + .HasName("idx_browser_tests_browser"); + + b.HasIndex("Os") + .HasName("idx_browser_tests_os"); + + b.HasIndex("Platform") + .HasName("idx_browser_tests_platform"); + + b.HasIndex("UserAgent") + .HasName("idx_browser_tests_user_agent"); + + b.HasIndex("Version") + .HasName("idx_browser_tests_version"); + + b.ToTable("browser_tests"); + }); + + modelBuilder.Entity("Marechai.Database.Models.CompaniesByBook", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("BookId") + .HasColumnType("bigint"); + + b.Property("CompanyId") + .HasColumnType("int"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("char(3)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("BookId"); + + b.HasIndex("CompanyId"); + + b.HasIndex("RoleId"); + + b.ToTable("CompaniesByBooks"); + }); + + modelBuilder.Entity("Marechai.Database.Models.CompaniesByDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CompanyId") + .HasColumnType("int"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("DocumentId") + .HasColumnType("bigint"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("char(3)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CompanyId"); + + b.HasIndex("DocumentId"); + + b.HasIndex("RoleId"); + + b.ToTable("CompaniesByDocuments"); + }); + + modelBuilder.Entity("Marechai.Database.Models.CompaniesByMagazine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CompanyId") + .HasColumnType("int"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MagazineId") + .HasColumnType("bigint"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("char(3)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CompanyId"); + + b.HasIndex("MagazineId"); + + b.HasIndex("RoleId"); + + b.ToTable("CompaniesByMagazines"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Company", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Address") + .HasColumnName("address") + .HasColumnType("varchar(80)") + .HasMaxLength(80); + + b.Property("City") + .HasColumnName("city") + .HasColumnType("varchar(80)") + .HasMaxLength(80); + + b.Property("CountryId") + .HasColumnName("country") + .HasColumnType("smallint(3)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("DocumentCompanyId") + .HasColumnType("int"); + + b.Property("Facebook") + .HasColumnName("facebook") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Founded") + .HasColumnName("founded") + .HasColumnType("datetime"); + + b.Property("Name") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("name") + .HasColumnType("varchar(128)") + .HasDefaultValueSql("''"); + + b.Property("PostalCode") + .HasColumnName("postal_code") + .HasColumnType("varchar(25)") + .HasMaxLength(25); + + b.Property("Province") + .HasColumnName("province") + .HasColumnType("varchar(80)") + .HasMaxLength(80); + + b.Property("Sold") + .HasColumnName("sold") + .HasColumnType("datetime"); + + b.Property("SoldToId") + .HasColumnName("sold_to") + .HasColumnType("int(11)"); + + b.Property("Status") + .HasColumnName("status") + .HasColumnType("int(11)"); + + b.Property("Twitter") + .HasColumnName("twitter") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("Website") + .HasColumnName("website") + .HasColumnType("varchar(255)") + .HasMaxLength(255); + + b.HasKey("Id"); + + b.HasIndex("Address") + .HasName("idx_companies_address"); + + b.HasIndex("City") + .HasName("idx_companies_city"); + + b.HasIndex("CountryId") + .HasName("idx_companies_country"); + + b.HasIndex("Facebook") + .HasName("idx_companies_facebook"); + + b.HasIndex("Founded") + .HasName("idx_companies_founded"); + + b.HasIndex("Name") + .HasName("idx_companies_name"); + + b.HasIndex("PostalCode") + .HasName("idx_companies_postal_code"); + + b.HasIndex("Province") + .HasName("idx_companies_province"); + + b.HasIndex("Sold") + .HasName("idx_companies_sold"); + + b.HasIndex("SoldToId") + .HasName("idx_companies_sold_to"); + + b.HasIndex("Status") + .HasName("idx_companies_status"); + + b.HasIndex("Twitter") + .HasName("idx_companies_twitter"); + + b.HasIndex("Website") + .HasName("idx_companies_website"); + + b.ToTable("companies"); + }); + + modelBuilder.Entity("Marechai.Database.Models.CompanyDescription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CompanyId") + .HasColumnType("int(11)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Html") + .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasMaxLength(262144); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasMaxLength(262144); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CompanyId"); + + b.HasIndex("Text") + .HasAnnotation("MySql:FullTextIndex", true); + + b.ToTable("CompanyDescriptions"); + }); + + modelBuilder.Entity("Marechai.Database.Models.CompanyLogo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .HasColumnName("company_id") + .HasColumnType("int(11)"); + + b.Property("Guid") + .HasColumnName("logo_guid") + .HasColumnType("char(36)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("Year") + .HasColumnName("year") + .HasColumnType("int(4)"); + + b.HasKey("Id", "CompanyId", "Guid"); + + b.HasIndex("CompanyId") + .HasName("idx_company_id"); + + b.HasIndex("Guid") + .HasName("idx_guid"); + + b.HasIndex("Id") + .IsUnique() + .HasName("idx_id"); + + b.ToTable("company_logos"); + }); + + modelBuilder.Entity("Marechai.Database.Models.CurrencyInflation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("CurrencyCode") + .IsRequired() + .HasColumnType("varchar(3) CHARACTER SET utf8mb4"); + + b.Property("Inflation") + .HasColumnType("float"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("Year") + .HasColumnType("int unsigned"); + + b.HasKey("Id"); + + b.HasIndex("CurrencyCode"); + + b.HasIndex("Year"); + + b.ToTable("CurrenciesInflation"); + }); + + modelBuilder.Entity("Marechai.Database.Models.CurrencyPegging", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("DestinationCode") + .IsRequired() + .HasColumnType("varchar(3) CHARACTER SET utf8mb4"); + + b.Property("End") + .HasColumnType("datetime(6)"); + + b.Property("Ratio") + .HasColumnType("float"); + + b.Property("SourceCode") + .IsRequired() + .HasColumnType("varchar(3) CHARACTER SET utf8mb4"); + + b.Property("Start") + .HasColumnType("datetime(6)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("DestinationCode"); + + b.HasIndex("End"); + + b.HasIndex("SourceCode"); + + b.HasIndex("Start"); + + b.ToTable("CurrenciesPegging"); + }); + + modelBuilder.Entity("Marechai.Database.Models.DbFile", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned"); + + b.Property("AccoustId") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Hack") + .HasColumnType("bit(1)"); + + b.Property("HackGroup") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Infected") + .HasColumnType("bit(1)"); + + b.Property("Magic") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Malware") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Md5") + .HasColumnType("binary(16)"); + + b.Property("Mime") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Sha1") + .HasColumnType("binary(20)"); + + b.Property("Sha256") + .HasColumnType("binary(32)"); + + b.Property("Sha3") + .HasColumnType("binary(64)"); + + b.Property("Size") + .HasColumnType("bigint unsigned"); + + b.Property("Spamsum") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AccoustId"); + + b.HasIndex("Hack"); + + b.HasIndex("HackGroup"); + + b.HasIndex("Infected"); + + b.HasIndex("Magic"); + + b.HasIndex("Malware"); + + b.HasIndex("Md5"); + + b.HasIndex("Mime"); + + b.HasIndex("Sha1"); + + b.HasIndex("Sha256"); + + b.HasIndex("Sha3"); + + b.HasIndex("Size"); + + b.HasIndex("Spamsum"); + + b.ToTable("Files"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Document", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CountryId") + .HasColumnType("smallint(3)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("NativeTitle") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Published") + .HasColumnType("datetime(6)"); + + b.Property("Synopsis") + .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasMaxLength(262144); + + b.Property("Title") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CountryId"); + + b.HasIndex("NativeTitle"); + + b.HasIndex("Published"); + + b.HasIndex("Synopsis") + .HasAnnotation("MySql:FullTextIndex", true); + + b.HasIndex("Title"); + + b.ToTable("Documents"); + }); + + modelBuilder.Entity("Marechai.Database.Models.DocumentCompany", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CompanyId") + .HasColumnType("int(11)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CompanyId") + .IsUnique(); + + b.HasIndex("Name"); + + b.ToTable("DocumentCompanies"); + }); + + modelBuilder.Entity("Marechai.Database.Models.DocumentPerson", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Alias") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("DisplayName") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("PersonId") + .HasColumnType("int"); + + b.Property("Surname") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Alias"); + + b.HasIndex("DisplayName"); + + b.HasIndex("Name"); + + b.HasIndex("PersonId") + .IsUnique(); + + b.HasIndex("Surname"); + + b.ToTable("DocumentPeople"); + }); + + modelBuilder.Entity("Marechai.Database.Models.DocumentRole", b => + { + b.Property("Id") + .HasColumnType("char(3)"); + + b.Property("Enabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit(1)") + .HasDefaultValue(true); + + b.Property("Name") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("Enabled"); + + b.HasIndex("Name"); + + b.ToTable("DocumentRoles"); + }); + + modelBuilder.Entity("Marechai.Database.Models.DocumentsByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("DocumentId") + .HasColumnType("bigint"); + + b.Property("MachineId") + .HasColumnType("int(11)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("MachineId"); + + b.ToTable("DocumentsByMachines"); + }); + + modelBuilder.Entity("Marechai.Database.Models.DocumentsByMachineFamily", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("DocumentId") + .HasColumnType("bigint"); + + b.Property("MachineFamilyId") + .HasColumnType("int(11)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("MachineFamilyId"); + + b.ToTable("DocumentsByMachineFamily"); + }); + + modelBuilder.Entity("Marechai.Database.Models.DumpHardware", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Extents") + .IsRequired() + .HasColumnType("json"); + + b.Property("Firmware") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("Manufacturer") + .HasColumnType("varchar(48) CHARACTER SET utf8mb4") + .HasMaxLength(48); + + b.Property("Model") + .IsRequired() + .HasColumnType("varchar(48) CHARACTER SET utf8mb4") + .HasMaxLength(48); + + b.Property("Revision") + .HasColumnType("varchar(48) CHARACTER SET utf8mb4") + .HasMaxLength(48); + + b.Property("Serial") + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("SoftwareName") + .IsRequired() + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("SoftwareOperatingSystem") + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("SoftwareVersion") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Firmware"); + + b.HasIndex("Manufacturer"); + + b.HasIndex("Model"); + + b.HasIndex("Revision"); + + b.HasIndex("Serial"); + + b.HasIndex("SoftwareName"); + + b.HasIndex("SoftwareOperatingSystem"); + + b.HasIndex("SoftwareVersion"); + + b.ToTable("DumpHardwares"); + }); + + modelBuilder.Entity("Marechai.Database.Models.FileDataStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("FileId") + .HasColumnType("bigint unsigned"); + + b.Property("Name") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4") + .HasMaxLength(255); + + b.Property("Size") + .HasColumnType("bigint unsigned"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("FileId"); + + b.HasIndex("Name"); + + b.HasIndex("Size"); + + b.ToTable("FileDataStreams"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Filesystem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned"); + + b.Property("ApplicationIdentifier") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("BackupDate") + .HasColumnType("datetime(6)"); + + b.Property("Bootable") + .HasColumnType("bit(1)"); + + b.Property("ClusterSize") + .HasColumnType("int"); + + b.Property("Clusters") + .HasColumnType("bigint unsigned"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("DataPreparerIdentifier") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("EffectiveDate") + .HasColumnType("datetime(6)"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("Files") + .HasColumnType("bigint unsigned"); + + b.Property("FreeClusters") + .HasColumnType("bigint unsigned"); + + b.Property("Label") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("ModificationDate") + .HasColumnType("datetime(6)"); + + b.Property("PublisherIdentifier") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Serial") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("SystemIdentifier") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Type") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("VolumeSetIdentifier") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationIdentifier"); + + b.HasIndex("BackupDate"); + + b.HasIndex("CreationDate"); + + b.HasIndex("DataPreparerIdentifier"); + + b.HasIndex("Label"); + + b.HasIndex("ModificationDate"); + + b.HasIndex("PublisherIdentifier"); + + b.HasIndex("Serial"); + + b.HasIndex("SystemIdentifier"); + + b.HasIndex("Type"); + + b.HasIndex("VolumeSetIdentifier"); + + b.ToTable("Filesystems"); + }); + + modelBuilder.Entity("Marechai.Database.Models.FilesystemsByLogicalPartition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("FilesystemId") + .HasColumnType("bigint unsigned"); + + b.Property("PartitionId") + .HasColumnType("bigint unsigned"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("FilesystemId"); + + b.HasIndex("PartitionId"); + + b.ToTable("FilesystemsByLogicalPartition"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Forbidden", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Browser") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("browser") + .HasColumnType("char(128)") + .HasDefaultValueSql("''"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Date") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("date") + .HasColumnType("char(20)") + .HasDefaultValueSql("''"); + + b.Property("Ip") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("ip") + .HasColumnType("char(16)") + .HasDefaultValueSql("''"); + + b.Property("Referer") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("referer") + .HasColumnType("char(255)") + .HasDefaultValueSql("''"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Browser") + .HasName("idx_forbidden_browser"); + + b.HasIndex("Date") + .HasName("idx_forbidden_date"); + + b.HasIndex("Ip") + .HasName("idx_forbidden_ip"); + + b.HasIndex("Referer") + .HasName("idx_forbidden_referer"); + + b.ToTable("forbidden"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Gpu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .HasColumnName("company") + .HasColumnType("int(11)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("DieSize") + .HasColumnName("die_size") + .HasColumnType("float"); + + b.Property("Introduced") + .HasColumnName("introduced") + .HasColumnType("datetime"); + + b.Property("ModelCode") + .HasColumnName("model_code") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Name") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("name") + .HasColumnType("char(128)") + .HasDefaultValueSql("''") + .HasMaxLength(128); + + b.Property("Package") + .HasColumnName("package") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Process") + .HasColumnName("process") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("ProcessNm") + .HasColumnName("process_nm") + .HasColumnType("float"); + + b.Property("Transistors") + .HasColumnName("transistors") + .HasColumnType("bigint(20)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CompanyId") + .HasName("idx_gpus_company"); + + b.HasIndex("DieSize") + .HasName("idx_gpus_die_size"); + + b.HasIndex("Introduced") + .HasName("idx_gpus_introduced"); + + b.HasIndex("ModelCode") + .HasName("idx_gpus_model_code"); + + b.HasIndex("Name") + .HasName("idx_gpus_name"); + + b.HasIndex("Package") + .HasName("idx_gpus_package"); + + b.HasIndex("Process") + .HasName("idx_gpus_process"); + + b.HasIndex("ProcessNm") + .HasName("idx_gpus_process_nm"); + + b.HasIndex("Transistors") + .HasName("idx_gpus_transistors"); + + b.ToTable("gpus"); + }); + + modelBuilder.Entity("Marechai.Database.Models.GpusByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("GpuId") + .HasColumnName("gpu") + .HasColumnType("int(11)"); + + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GpuId") + .HasName("idx_gpus_by_machine_gpus"); + + b.HasIndex("MachineId") + .HasName("idx_gpus_by_machine_machine"); + + b.ToTable("gpus_by_machine"); + }); + + modelBuilder.Entity("Marechai.Database.Models.GpusByOwnedMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("GpuId") + .HasColumnType("int(11)"); + + b.Property("OwnedMachineId") + .HasColumnType("bigint"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GpuId"); + + b.HasIndex("OwnedMachineId"); + + b.ToTable("GpusByOwnedMachine"); + }); + + modelBuilder.Entity("Marechai.Database.Models.InstructionSet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasColumnName("instruction_set") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.ToTable("instruction_sets"); + }); + + modelBuilder.Entity("Marechai.Database.Models.InstructionSetExtension", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Extension") + .IsRequired() + .HasColumnName("extension") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.ToTable("instruction_set_extensions"); + }); + + modelBuilder.Entity("Marechai.Database.Models.InstructionSetExtensionsByProcessor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("ProcessorId") + .HasColumnName("processor_id") + .HasColumnType("int(11)"); + + b.Property("ExtensionId") + .HasColumnName("extension_id") + .HasColumnType("int(11)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id", "ProcessorId", "ExtensionId"); + + b.HasIndex("ExtensionId") + .HasName("idx_setextension_extension"); + + b.HasIndex("ProcessorId") + .HasName("idx_setextension_processor"); + + b.ToTable("instruction_set_extensions_by_processor"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Iso31661Numeric", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("smallint(3)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasColumnName("name") + .HasColumnType("varchar(64)") + .HasMaxLength(64); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .HasName("idx_name"); + + b.ToTable("iso3166_1_numeric"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Iso4217", b => + { + b.Property("Code") + .HasColumnType("varchar(3) CHARACTER SET utf8mb4") + .HasMaxLength(3); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MinorUnits") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(150) CHARACTER SET utf8mb4") + .HasMaxLength(150); + + b.Property("Numeric") + .HasColumnType("smallint(3)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("Withdrawn") + .HasColumnType("datetime(6)"); + + b.HasKey("Code"); + + b.HasIndex("Numeric"); + + b.HasIndex("Withdrawn"); + + b.ToTable("Iso4217"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Iso639", b => + { + b.Property("Id") + .HasColumnType("char(3)"); + + b.Property("Comment") + .HasColumnType("varchar(150)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Part1") + .HasColumnType("char(2)"); + + b.Property("Part2B") + .HasColumnType("char(3)"); + + b.Property("Part2T") + .HasColumnType("char(3)"); + + b.Property("ReferenceName") + .IsRequired() + .HasColumnName("Ref_Name") + .HasColumnType("varchar(150)"); + + b.Property("Scope") + .IsRequired() + .HasColumnType("char(1)"); + + b.Property("Type") + .IsRequired() + .HasColumnType("char(1)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Comment"); + + b.HasIndex("Part1"); + + b.HasIndex("Part2B"); + + b.HasIndex("Part2T"); + + b.HasIndex("ReferenceName"); + + b.HasIndex("Scope"); + + b.HasIndex("Type"); + + b.ToTable("ISO_639-3"); + }); + + modelBuilder.Entity("Marechai.Database.Models.License", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("FsfApproved") + .HasColumnType("bit(1)"); + + b.Property("Link") + .HasColumnType("varchar(512) CHARACTER SET utf8mb4") + .HasMaxLength(512); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("OsiApproved") + .HasColumnType("bit(1)"); + + b.Property("SPDX") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Text") + .HasColumnType("longtext") + .HasMaxLength(131072); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("FsfApproved"); + + b.HasIndex("Name"); + + b.HasIndex("OsiApproved"); + + b.HasIndex("SPDX"); + + b.ToTable("Licenses"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Log", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Browser") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("browser") + .HasColumnType("char(128)") + .HasDefaultValueSql("''"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Date") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("date") + .HasColumnType("char(20)") + .HasDefaultValueSql("''"); + + b.Property("Ip") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("ip") + .HasColumnType("char(16)") + .HasDefaultValueSql("''"); + + b.Property("Referer") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("referer") + .HasColumnType("char(255)") + .HasDefaultValueSql("''"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Browser") + .HasName("idx_log_browser"); + + b.HasIndex("Date") + .HasName("idx_log_date"); + + b.HasIndex("Ip") + .HasName("idx_log_ip"); + + b.HasIndex("Referer") + .HasName("idx_log_referer"); + + b.ToTable("log"); + }); + + modelBuilder.Entity("Marechai.Database.Models.LogicalPartition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("FirstSector") + .HasColumnType("bigint unsigned"); + + b.Property("LastSector") + .HasColumnType("bigint unsigned"); + + b.Property("Name") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Scheme") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Sequence") + .HasColumnType("int unsigned"); + + b.Property("Size") + .HasColumnType("bigint unsigned"); + + b.Property("Type") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Description"); + + b.HasIndex("FirstSector"); + + b.HasIndex("LastSector"); + + b.HasIndex("Name"); + + b.HasIndex("Scheme"); + + b.HasIndex("Type"); + + b.ToTable("LogicalPartitions"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Machine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .ValueGeneratedOnAdd() + .HasColumnName("company") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("FamilyId") + .HasColumnName("family") + .HasColumnType("int(11)"); + + b.Property("Introduced") + .HasColumnName("introduced") + .HasColumnType("datetime"); + + b.Property("Model") + .HasColumnName("model") + .HasColumnType("varchar(50)") + .HasMaxLength(50); + + b.Property("Name") + .IsRequired() + .HasColumnName("name") + .HasColumnType("varchar(255)") + .HasMaxLength(255); + + b.Property("Type") + .ValueGeneratedOnAdd() + .HasColumnName("type") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CompanyId") + .HasName("idx_machines_company"); + + b.HasIndex("FamilyId") + .HasName("idx_machines_family"); + + b.HasIndex("Introduced") + .HasName("idx_machines_introduced"); + + b.HasIndex("Model") + .HasName("idx_machines_model"); + + b.HasIndex("Name") + .HasName("idx_machines_name"); + + b.HasIndex("Type") + .HasName("idx_machines_type"); + + b.ToTable("machines"); + }); + + modelBuilder.Entity("Marechai.Database.Models.MachineFamily", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .HasColumnName("company") + .HasColumnType("int(11)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasColumnName("name") + .HasColumnType("varchar(255)") + .HasMaxLength(255); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CompanyId") + .HasName("idx_machine_families_company"); + + b.HasIndex("Name") + .HasName("idx_machine_families_name"); + + b.ToTable("machine_families"); + }); + + modelBuilder.Entity("Marechai.Database.Models.MachinePhoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Aperture") + .HasColumnType("double"); + + b.Property("Author") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("CameraManufacturer") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("CameraModel") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("ColorSpace") + .HasColumnType("smallint unsigned"); + + b.Property("Comments") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Contrast") + .HasColumnType("smallint unsigned"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("DigitalZoomRatio") + .HasColumnType("double"); + + b.Property("ExifVersion") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("ExposureMethod") + .HasColumnType("smallint unsigned"); + + b.Property("ExposureProgram") + .HasColumnType("smallint unsigned"); + + b.Property("ExposureTime") + .HasColumnType("double"); + + b.Property("Flash") + .HasColumnType("smallint unsigned"); + + b.Property("Focal") + .HasColumnType("double"); + + b.Property("FocalLength") + .HasColumnType("double"); + + b.Property("FocalLengthEquivalent") + .HasColumnType("double"); + + b.Property("HorizontalResolution") + .HasColumnType("double"); + + b.Property("IsoRating") + .HasColumnType("smallint unsigned"); + + b.Property("Lens") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("LicenseId") + .HasColumnType("int"); + + b.Property("LightSource") + .HasColumnType("smallint unsigned"); + + b.Property("MachineId") + .HasColumnType("int(11)"); + + b.Property("MeteringMode") + .HasColumnType("smallint unsigned"); + + b.Property("Orientation") + .HasColumnType("smallint unsigned"); + + b.Property("OriginalExtension") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("ResolutionUnit") + .HasColumnType("smallint unsigned"); + + b.Property("Saturation") + .HasColumnType("smallint unsigned"); + + b.Property("SceneCaptureType") + .HasColumnType("smallint unsigned"); + + b.Property("SensingMethod") + .HasColumnType("smallint unsigned"); + + b.Property("Sharpness") + .HasColumnType("smallint unsigned"); + + b.Property("SoftwareUsed") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Source") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("SubjectDistanceRange") + .HasColumnType("smallint unsigned"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("UploadDate") + .IsConcurrencyToken() + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("VerticalResolution") + .HasColumnType("double"); + + b.Property("WhiteBalance") + .HasColumnType("smallint unsigned"); + + b.HasKey("Id"); + + b.HasIndex("Aperture"); + + b.HasIndex("Author"); + + b.HasIndex("CameraManufacturer"); + + b.HasIndex("CameraModel"); + + b.HasIndex("ColorSpace"); + + b.HasIndex("Comments"); + + b.HasIndex("Contrast"); + + b.HasIndex("CreationDate"); + + b.HasIndex("DigitalZoomRatio"); + + b.HasIndex("ExifVersion"); + + b.HasIndex("ExposureMethod"); + + b.HasIndex("ExposureProgram"); + + b.HasIndex("ExposureTime"); + + b.HasIndex("Flash"); + + b.HasIndex("Focal"); + + b.HasIndex("FocalLength"); + + b.HasIndex("FocalLengthEquivalent"); + + b.HasIndex("HorizontalResolution"); + + b.HasIndex("IsoRating"); + + b.HasIndex("Lens"); + + b.HasIndex("LicenseId"); + + b.HasIndex("LightSource"); + + b.HasIndex("MachineId"); + + b.HasIndex("MeteringMode"); + + b.HasIndex("Orientation"); + + b.HasIndex("ResolutionUnit"); + + b.HasIndex("Saturation"); + + b.HasIndex("SceneCaptureType"); + + b.HasIndex("SensingMethod"); + + b.HasIndex("Sharpness"); + + b.HasIndex("SoftwareUsed"); + + b.HasIndex("SubjectDistanceRange"); + + b.HasIndex("UploadDate"); + + b.HasIndex("UserId"); + + b.HasIndex("VerticalResolution"); + + b.HasIndex("WhiteBalance"); + + b.ToTable("MachinePhotos"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Magazine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CountryId") + .HasColumnType("smallint(3)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("FirstPublication") + .HasColumnType("datetime(6)"); + + b.Property("Issn") + .HasColumnType("varchar(8) CHARACTER SET utf8mb4") + .HasMaxLength(8); + + b.Property("NativeTitle") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Published") + .HasColumnType("datetime(6)"); + + b.Property("Synopsis") + .HasColumnType("longtext CHARACTER SET utf8mb4") + .HasMaxLength(262144); + + b.Property("Title") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CountryId"); + + b.HasIndex("FirstPublication"); + + b.HasIndex("Issn"); + + b.HasIndex("NativeTitle"); + + b.HasIndex("Published"); + + b.HasIndex("Synopsis") + .HasAnnotation("MySql:FullTextIndex", true); + + b.HasIndex("Title"); + + b.ToTable("Magazines"); + }); + + modelBuilder.Entity("Marechai.Database.Models.MagazineIssue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Caption") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MagazineId") + .HasColumnType("bigint"); + + b.Property("NativeCaption") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Pages") + .HasColumnType("smallint"); + + b.Property("ProductCode") + .HasColumnType("varchar(18) CHARACTER SET utf8mb4") + .HasMaxLength(18); + + b.Property("Published") + .HasColumnType("datetime(6)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Caption"); + + b.HasIndex("MagazineId"); + + b.HasIndex("NativeCaption"); + + b.HasIndex("Pages"); + + b.HasIndex("ProductCode"); + + b.HasIndex("Published"); + + b.ToTable("MagazineIssues"); + }); + + modelBuilder.Entity("Marechai.Database.Models.MagazinesByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MachineId") + .HasColumnType("int(11)"); + + b.Property("MagazineId") + .HasColumnType("bigint"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("MachineId"); + + b.HasIndex("MagazineId"); + + b.ToTable("MagazinesByMachines"); + }); + + modelBuilder.Entity("Marechai.Database.Models.MagazinesByMachineFamily", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MachineFamilyId") + .HasColumnType("int(11)"); + + b.Property("MagazineId") + .HasColumnType("bigint"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("MachineFamilyId"); + + b.HasIndex("MagazineId"); + + b.ToTable("MagazinesByMachinesFamilies"); + }); + + modelBuilder.Entity("Marechai.Database.Models.MarechaiDb", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Updated") + .ValueGeneratedOnAdd() + .HasColumnName("updated") + .HasColumnType("datetime") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Version") + .HasColumnName("version") + .HasColumnType("int(11)"); + + b.HasKey("Id"); + + b.ToTable("marechai_db"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Media", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned"); + + b.Property("Barcode") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("BlockSizes") + .HasColumnType("json"); + + b.Property("CatalogueNumber") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("CopyProtection") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Firmware") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("LastSequence") + .HasColumnType("smallint unsigned"); + + b.Property("Layers") + .HasColumnType("smallint unsigned"); + + b.Property("LogicalBlockSize") + .HasColumnType("int"); + + b.Property("Manufacturer") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Model") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("PartNumber") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("PhysicalBlockSize") + .HasColumnType("int"); + + b.Property("Revision") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Sectors") + .HasColumnType("bigint unsigned"); + + b.Property("Sequence") + .HasColumnType("smallint unsigned"); + + b.Property("SerialNumber") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Sessions") + .HasColumnType("smallint unsigned"); + + b.Property("Sides") + .HasColumnType("smallint unsigned"); + + b.Property("Size") + .HasColumnType("bigint unsigned"); + + b.Property("StorageInterface") + .HasColumnType("int"); + + b.Property("Title") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Tracks") + .HasColumnType("smallint unsigned"); + + b.Property("Type") + .HasColumnType("int unsigned"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("WriteOffset") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Barcode"); + + b.HasIndex("CatalogueNumber"); + + b.HasIndex("CopyProtection"); + + b.HasIndex("Firmware"); + + b.HasIndex("Manufacturer"); + + b.HasIndex("Model"); + + b.HasIndex("PartNumber"); + + b.HasIndex("Revision"); + + b.HasIndex("SerialNumber"); + + b.HasIndex("Title"); + + b.HasIndex("Type"); + + b.ToTable("Media"); + }); + + modelBuilder.Entity("Marechai.Database.Models.MemoryByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); + + b.Property("Size") + .HasColumnName("size") + .HasColumnType("bigint(20)"); + + b.Property("Speed") + .HasColumnName("speed") + .HasColumnType("double"); + + b.Property("Type") + .ValueGeneratedOnAdd() + .HasColumnName("type") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("Usage") + .ValueGeneratedOnAdd() + .HasColumnName("usage") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.HasKey("Id"); + + b.HasIndex("MachineId") + .HasName("idx_memory_by_machine_machine"); + + b.HasIndex("Size") + .HasName("idx_memory_by_machine_size"); + + b.HasIndex("Speed") + .HasName("idx_memory_by_machine_speed"); + + b.HasIndex("Type") + .HasName("idx_memory_by_machine_type"); + + b.HasIndex("Usage") + .HasName("idx_memory_by_machine_usage"); + + b.ToTable("memory_by_machine"); + }); + + modelBuilder.Entity("Marechai.Database.Models.MemoryByOwnedMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("OwnedMachineId") + .HasColumnType("bigint"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("Speed") + .HasColumnType("double"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("Usage") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("OwnedMachineId"); + + b.HasIndex("Size"); + + b.HasIndex("Speed"); + + b.HasIndex("Type"); + + b.HasIndex("Usage"); + + b.ToTable("MemoryByOwnedMachine"); + }); + + modelBuilder.Entity("Marechai.Database.Models.MoneyDonation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Donator") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("donator") + .HasColumnType("char(128)") + .HasDefaultValueSql("''"); + + b.Property("Quantity") + .ValueGeneratedOnAdd() + .HasColumnName("quantity") + .HasColumnType("decimal(11,2)") + .HasDefaultValueSql("'0.00'"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Donator") + .HasName("idx_money_donations_donator"); + + b.HasIndex("Quantity") + .HasName("idx_money_donations_quantity"); + + b.ToTable("money_donations"); + }); + + modelBuilder.Entity("Marechai.Database.Models.News", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("AddedId") + .ValueGeneratedOnAdd() + .HasColumnName("added_id") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Date") + .HasColumnName("date") + .HasColumnType("datetime"); + + b.Property("Type") + .ValueGeneratedOnAdd() + .HasColumnName("type") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AddedId") + .HasName("idx_news_ip"); + + b.HasIndex("Date") + .HasName("idx_news_date"); + + b.HasIndex("Type") + .HasName("idx_news_type"); + + b.ToTable("news"); + }); + + modelBuilder.Entity("Marechai.Database.Models.OwnedMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("AcquisitionDate") + .HasColumnType("datetime(6)"); + + b.Property("Boxed") + .HasColumnType("bit(1)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("LastStatusDate") + .HasColumnType("datetime(6)"); + + b.Property("LostDate") + .HasColumnType("datetime(6)"); + + b.Property("MachineId") + .HasColumnType("int(11)"); + + b.Property("Manuals") + .HasColumnType("bit(1)"); + + b.Property("SerialNumber") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("SerialNumberVisible") + .ValueGeneratedOnAdd() + .HasColumnType("bit(1)") + .HasDefaultValue(true); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Trade") + .HasColumnType("bit(1)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("AcquisitionDate"); + + b.HasIndex("Boxed"); + + b.HasIndex("LastStatusDate"); + + b.HasIndex("LostDate"); + + b.HasIndex("MachineId"); + + b.HasIndex("Manuals"); + + b.HasIndex("SerialNumber"); + + b.HasIndex("SerialNumberVisible"); + + b.HasIndex("Status"); + + b.HasIndex("Trade"); + + b.HasIndex("UserId"); + + b.ToTable("OwnedMachines"); + }); + + modelBuilder.Entity("Marechai.Database.Models.OwnedMachinePhoto", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Aperture") + .HasColumnType("double"); + + b.Property("Author") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("CameraManufacturer") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("CameraModel") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("ColorSpace") + .HasColumnType("smallint unsigned"); + + b.Property("Comments") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Contrast") + .HasColumnType("smallint unsigned"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("DigitalZoomRatio") + .HasColumnType("double"); + + b.Property("ExifVersion") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("ExposureMethod") + .HasColumnType("smallint unsigned"); + + b.Property("ExposureProgram") + .HasColumnType("smallint unsigned"); + + b.Property("ExposureTime") + .HasColumnType("double"); + + b.Property("Flash") + .HasColumnType("smallint unsigned"); + + b.Property("Focal") + .HasColumnType("double"); + + b.Property("FocalLength") + .HasColumnType("double"); + + b.Property("FocalLengthEquivalent") + .HasColumnType("double"); + + b.Property("HorizontalResolution") + .HasColumnType("double"); + + b.Property("IsoRating") + .HasColumnType("smallint unsigned"); + + b.Property("Lens") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("LicenseId") + .HasColumnType("int"); + + b.Property("LightSource") + .HasColumnType("smallint unsigned"); + + b.Property("MeteringMode") + .HasColumnType("smallint unsigned"); + + b.Property("Orientation") + .HasColumnType("smallint unsigned"); + + b.Property("OriginalExtension") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("OwnedMachineId") + .HasColumnType("bigint"); + + b.Property("ResolutionUnit") + .HasColumnType("smallint unsigned"); + + b.Property("Saturation") + .HasColumnType("smallint unsigned"); + + b.Property("SceneCaptureType") + .HasColumnType("smallint unsigned"); + + b.Property("SensingMethod") + .HasColumnType("smallint unsigned"); + + b.Property("Sharpness") + .HasColumnType("smallint unsigned"); + + b.Property("SoftwareUsed") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("SubjectDistanceRange") + .HasColumnType("smallint unsigned"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("UploadDate") + .IsConcurrencyToken() + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("VerticalResolution") + .HasColumnType("double"); + + b.Property("WhiteBalance") + .HasColumnType("smallint unsigned"); + + b.HasKey("Id"); + + b.HasIndex("Aperture"); + + b.HasIndex("Author"); + + b.HasIndex("CameraManufacturer"); + + b.HasIndex("CameraModel"); + + b.HasIndex("ColorSpace"); + + b.HasIndex("Comments"); + + b.HasIndex("Contrast"); + + b.HasIndex("CreationDate"); + + b.HasIndex("DigitalZoomRatio"); + + b.HasIndex("ExifVersion"); + + b.HasIndex("ExposureMethod"); + + b.HasIndex("ExposureProgram"); + + b.HasIndex("ExposureTime"); + + b.HasIndex("Flash"); + + b.HasIndex("Focal"); + + b.HasIndex("FocalLength"); + + b.HasIndex("FocalLengthEquivalent"); + + b.HasIndex("HorizontalResolution"); + + b.HasIndex("IsoRating"); + + b.HasIndex("Lens"); + + b.HasIndex("LicenseId"); + + b.HasIndex("LightSource"); + + b.HasIndex("MeteringMode"); + + b.HasIndex("Orientation"); + + b.HasIndex("OwnedMachineId"); + + b.HasIndex("ResolutionUnit"); + + b.HasIndex("Saturation"); + + b.HasIndex("SceneCaptureType"); + + b.HasIndex("SensingMethod"); + + b.HasIndex("Sharpness"); + + b.HasIndex("SoftwareUsed"); + + b.HasIndex("SubjectDistanceRange"); + + b.HasIndex("UploadDate"); + + b.HasIndex("UserId"); + + b.HasIndex("VerticalResolution"); + + b.HasIndex("WhiteBalance"); + + b.ToTable("OwnedMachinePhotos"); + }); + + modelBuilder.Entity("Marechai.Database.Models.PeopleByBook", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("BookId") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("PersonId") + .HasColumnType("int"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("char(3)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("BookId"); + + b.HasIndex("PersonId"); + + b.HasIndex("RoleId"); + + b.ToTable("PeopleByBooks"); + }); + + modelBuilder.Entity("Marechai.Database.Models.PeopleByCompany", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CompanyId") + .HasColumnType("int(11)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("End") + .HasColumnType("datetime(6)"); + + b.Property("Ongoing") + .HasColumnType("bit(1)"); + + b.Property("PersonId") + .HasColumnType("int"); + + b.Property("Position") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Start") + .HasColumnType("datetime(6)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CompanyId"); + + b.HasIndex("End"); + + b.HasIndex("PersonId"); + + b.HasIndex("Position"); + + b.HasIndex("Start"); + + b.ToTable("PeopleByCompany"); + }); + + modelBuilder.Entity("Marechai.Database.Models.PeopleByDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("DocumentId") + .HasColumnType("bigint"); + + b.Property("PersonId") + .HasColumnType("int"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("char(3)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("PersonId"); + + b.HasIndex("RoleId"); + + b.ToTable("PeopleByDocuments"); + }); + + modelBuilder.Entity("Marechai.Database.Models.PeopleByMagazine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MagazineId") + .HasColumnType("bigint"); + + b.Property("PersonId") + .HasColumnType("int"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("char(3)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("MagazineId"); + + b.HasIndex("PersonId"); + + b.HasIndex("RoleId"); + + b.ToTable("PeopleByMagazines"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Person", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Alias") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("BirthDate") + .HasColumnType("datetime(6)"); + + b.Property("CountryOfBirthId") + .HasColumnType("smallint(3)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("DeathDate") + .HasColumnType("datetime(6)"); + + b.Property("DisplayName") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("DocumentPersonId") + .HasColumnType("int"); + + b.Property("Facebook") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Photo") + .HasColumnType("char(36)"); + + b.Property("Surname") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Twitter") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("Webpage") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("Alias"); + + b.HasIndex("BirthDate"); + + b.HasIndex("CountryOfBirthId"); + + b.HasIndex("DeathDate"); + + b.HasIndex("DisplayName"); + + b.HasIndex("Facebook"); + + b.HasIndex("Name"); + + b.HasIndex("Photo"); + + b.HasIndex("Surname"); + + b.HasIndex("Twitter"); + + b.HasIndex("Webpage"); + + b.ToTable("People"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Processor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("AddrBus") + .HasColumnName("addr_bus") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .HasColumnName("company") + .HasColumnType("int(11)"); + + b.Property("Cores") + .HasColumnName("cores") + .HasColumnType("int(11)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("DataBus") + .HasColumnName("data_bus") + .HasColumnType("int(11)"); + + b.Property("DieSize") + .HasColumnName("die_size") + .HasColumnType("float"); + + b.Property("FprSize") + .HasColumnName("FPR_size") + .HasColumnType("int(11)"); + + b.Property("Fprs") + .HasColumnName("FPRs") + .HasColumnType("int(11)"); + + b.Property("GprSize") + .HasColumnName("GPR_size") + .HasColumnType("int(11)"); + + b.Property("Gprs") + .HasColumnName("GPRs") + .HasColumnType("int(11)"); + + b.Property("InstructionSetId") + .HasColumnName("instruction_set") + .HasColumnType("int(11)"); + + b.Property("Introduced") + .HasColumnName("introduced") + .HasColumnType("datetime"); + + b.Property("L1Data") + .HasColumnName("L1_data") + .HasColumnType("float"); + + b.Property("L1Instruction") + .HasColumnName("L1_instruction") + .HasColumnType("float"); + + b.Property("L2") + .HasColumnType("float"); + + b.Property("L3") + .HasColumnType("float"); + + b.Property("ModelCode") + .HasColumnName("model_code") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Name") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("name") + .HasColumnType("char(50)") + .HasDefaultValueSql("''") + .HasMaxLength(50); + + b.Property("Package") + .HasColumnName("package") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Process") + .HasColumnName("process") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("ProcessNm") + .HasColumnName("process_nm") + .HasColumnType("float"); + + b.Property("SimdRegisters") + .HasColumnName("SIMD_registers") + .HasColumnType("int(11)"); + + b.Property("SimdSize") + .HasColumnName("SIMD_size") + .HasColumnType("int(11)"); + + b.Property("Speed") + .HasColumnName("speed") + .HasColumnType("double"); + + b.Property("ThreadsPerCore") + .HasColumnName("threads_per_core") + .HasColumnType("int(11)"); + + b.Property("Transistors") + .HasColumnName("transistors") + .HasColumnType("bigint(20)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AddrBus") + .HasName("idx_processors_addr_bus"); + + b.HasIndex("CompanyId") + .HasName("idx_processors_company"); + + b.HasIndex("Cores") + .HasName("idx_processors_cores"); + + b.HasIndex("DataBus") + .HasName("idx_processors_data_bus"); + + b.HasIndex("DieSize") + .HasName("idx_processors_die_size"); + + b.HasIndex("FprSize") + .HasName("idx_processors_FPR_size"); + + b.HasIndex("Fprs") + .HasName("idx_processors_FPRs"); + + b.HasIndex("GprSize") + .HasName("idx_processors_GPR_size"); + + b.HasIndex("Gprs") + .HasName("idx_processors_GPRs"); + + b.HasIndex("InstructionSetId") + .HasName("idx_processors_instruction_set"); + + b.HasIndex("Introduced") + .HasName("idx_processors_introduced"); + + b.HasIndex("L1Data") + .HasName("idx_processors_L1_data"); + + b.HasIndex("L1Instruction") + .HasName("idx_processors_L1_instruction"); + + b.HasIndex("L2") + .HasName("idx_processors_L2"); + + b.HasIndex("L3") + .HasName("idx_processors_L3"); + + b.HasIndex("ModelCode") + .HasName("idx_processors_model_code"); + + b.HasIndex("Name") + .HasName("idx_processors_name"); + + b.HasIndex("Package") + .HasName("idx_processors_package"); + + b.HasIndex("Process") + .HasName("idx_processors_process"); + + b.HasIndex("ProcessNm") + .HasName("idx_processors_process_nm"); + + b.HasIndex("SimdRegisters") + .HasName("idx_processors_SIMD_registers"); + + b.HasIndex("SimdSize") + .HasName("idx_processors_SIMD_size"); + + b.HasIndex("Speed") + .HasName("idx_processors_speed"); + + b.HasIndex("ThreadsPerCore") + .HasName("idx_processors_threads_per_core"); + + b.HasIndex("Transistors") + .HasName("idx_processors_transistors"); + + b.ToTable("processors"); + }); + + modelBuilder.Entity("Marechai.Database.Models.ProcessorsByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); + + b.Property("ProcessorId") + .HasColumnName("processor") + .HasColumnType("int(11)"); + + b.Property("Speed") + .HasColumnName("speed") + .HasColumnType("float"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("MachineId") + .HasName("idx_processors_by_machine_machine"); + + b.HasIndex("ProcessorId") + .HasName("idx_processors_by_machine_processor"); + + b.HasIndex("Speed") + .HasName("idx_processors_by_machine_speed"); + + b.ToTable("processors_by_machine"); + }); + + modelBuilder.Entity("Marechai.Database.Models.ProcessorsByOwnedMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("OwnedMachineId") + .HasColumnType("bigint"); + + b.Property("ProcessorId") + .HasColumnType("int(11)"); + + b.Property("Speed") + .HasColumnType("float"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("OwnedMachineId"); + + b.HasIndex("ProcessorId"); + + b.HasIndex("Speed"); + + b.ToTable("ProcessorsByOwnedMachine"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Resolution", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("Chars") + .ValueGeneratedOnAdd() + .HasColumnName("chars") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + b.Property("Colors") + .HasColumnName("colors") + .HasColumnType("bigint(20)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Grayscale") + .HasColumnType("bit(1)"); + + b.Property("Height") + .ValueGeneratedOnAdd() + .HasColumnName("height") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("Palette") + .HasColumnName("palette") + .HasColumnType("bigint(20)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("Width") + .ValueGeneratedOnAdd() + .HasColumnName("width") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.HasKey("Id"); + + b.HasIndex("Colors") + .HasName("idx_resolutions_colors"); + + b.HasIndex("Height") + .HasName("idx_resolutions_height"); + + b.HasIndex("Palette") + .HasName("idx_resolutions_palette"); + + b.HasIndex("Width") + .HasName("idx_resolutions_width"); + + b.HasIndex("Width", "Height") + .HasName("idx_resolutions_resolution"); + + b.HasIndex("Width", "Height", "Colors") + .HasName("idx_resolutions_resolution_with_color"); + + b.HasIndex("Width", "Height", "Colors", "Palette") + .HasName("idx_resolutions_resolution_with_color_and_palette"); + + b.ToTable("resolutions"); + }); + + modelBuilder.Entity("Marechai.Database.Models.ResolutionsByGpu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("GpuId") + .HasColumnName("gpu") + .HasColumnType("int(11)"); + + b.Property("ResolutionId") + .HasColumnName("resolution") + .HasColumnType("int(11)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GpuId") + .HasName("idx_resolutions_by_gpu_gpu"); + + b.HasIndex("ResolutionId") + .HasName("idx_resolutions_by_gpu_resolution"); + + b.ToTable("resolutions_by_gpu"); + }); + + modelBuilder.Entity("Marechai.Database.Models.ResolutionsByScreen", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("ResolutionId") + .HasColumnType("int(11)"); + + b.Property("ScreenId") + .HasColumnType("int"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ResolutionId"); + + b.HasIndex("ScreenId"); + + b.ToTable("ResolutionsByScreen"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Screen", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Diagonal") + .HasColumnType("double"); + + b.Property("EffectiveColors") + .HasColumnType("bigint"); + + b.Property("Height") + .HasColumnType("double"); + + b.Property("NativeResolutionId") + .HasColumnType("int(11)"); + + b.Property("Type") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("Width") + .HasColumnType("double"); + + b.HasKey("Id"); + + b.HasIndex("Diagonal"); + + b.HasIndex("EffectiveColors"); + + b.HasIndex("Height"); + + b.HasIndex("NativeResolutionId"); + + b.HasIndex("Type"); + + b.HasIndex("Width"); + + b.ToTable("Screens"); + }); + + modelBuilder.Entity("Marechai.Database.Models.ScreensByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MachineId") + .HasColumnType("int(11)"); + + b.Property("ScreenId") + .HasColumnType("int"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("MachineId"); + + b.HasIndex("ScreenId"); + + b.ToTable("ScreensByMachine"); + }); + + modelBuilder.Entity("Marechai.Database.Models.SoundByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); + + b.Property("SoundSynthId") + .HasColumnName("sound_synth") + .HasColumnType("int(11)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("MachineId") + .HasName("idx_sound_by_machine_machine"); + + b.HasIndex("SoundSynthId") + .HasName("idx_sound_by_machine_sound_synth"); + + b.ToTable("sound_by_machine"); + }); + + modelBuilder.Entity("Marechai.Database.Models.SoundByOwnedMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("OwnedMachineId") + .HasColumnType("bigint"); + + b.Property("SoundSynthId") + .HasColumnType("int(11)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("OwnedMachineId"); + + b.HasIndex("SoundSynthId"); + + b.ToTable("SoundByOwnedMachine"); + }); + + modelBuilder.Entity("Marechai.Database.Models.SoundSynth", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("int(11)"); + + b.Property("CompanyId") + .HasColumnName("company") + .HasColumnType("int(11)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Depth") + .HasColumnName("depth") + .HasColumnType("int(11)"); + + b.Property("Frequency") + .HasColumnName("frequency") + .HasColumnType("double"); + + b.Property("Introduced") + .HasColumnName("introduced") + .HasColumnType("datetime"); + + b.Property("ModelCode") + .HasColumnName("model_code") + .HasColumnType("varchar(45)") + .HasMaxLength(45); + + b.Property("Name") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnName("name") + .HasColumnType("char(50)") + .HasDefaultValueSql("''") + .HasMaxLength(50); + + b.Property("SquareWave") + .HasColumnName("square_wave") + .HasColumnType("int(11)"); + + b.Property("Type") + .HasColumnName("type") + .HasColumnType("int(11)"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.Property("Voices") + .HasColumnName("voices") + .HasColumnType("int(11)"); + + b.Property("WhiteNoise") + .HasColumnName("white_noise") + .HasColumnType("int(11)"); + + b.HasKey("Id"); + + b.HasIndex("CompanyId") + .HasName("idx_sound_synths_company"); + + b.HasIndex("Depth") + .HasName("idx_sound_synths_depth"); + + b.HasIndex("Frequency") + .HasName("idx_sound_synths_frequency"); + + b.HasIndex("Introduced") + .HasName("idx_sound_synths_introduced"); + + b.HasIndex("ModelCode") + .HasName("idx_sound_synths_model_code"); + + b.HasIndex("Name") + .HasName("idx_sound_synths_name"); + + b.HasIndex("SquareWave") + .HasName("idx_sound_synths_square_wave"); + + b.HasIndex("Type") + .HasName("idx_sound_synths_type"); + + b.HasIndex("Voices") + .HasName("idx_sound_synths_voices"); + + b.HasIndex("WhiteNoise") + .HasName("idx_sound_synths_white_noise"); + + b.ToTable("sound_synths"); + }); + + modelBuilder.Entity("Marechai.Database.Models.StorageByMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id") + .HasColumnType("bigint(20)"); + + b.Property("Capacity") + .HasColumnName("capacity") + .HasColumnType("bigint(20)"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Interface") + .ValueGeneratedOnAdd() + .HasColumnName("interface") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("MachineId") + .HasColumnName("machine") + .HasColumnType("int(11)"); + + b.Property("Type") + .ValueGeneratedOnAdd() + .HasColumnName("type") + .HasColumnType("int(11)") + .HasDefaultValueSql("'0'"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Capacity") + .HasName("idx_storage_capacity"); + + b.HasIndex("Interface") + .HasName("idx_storage_interface"); + + b.HasIndex("MachineId") + .HasName("idx_storage_machine"); + + b.HasIndex("Type") + .HasName("idx_storage_type"); + + b.ToTable("storage_by_machine"); + }); + + modelBuilder.Entity("Marechai.Database.Models.StorageByOwnedMachine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Capacity") + .HasColumnType("bigint"); + + b.Property("CreatedOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("Interface") + .HasColumnType("int"); + + b.Property("OwnedMachineId") + .HasColumnType("bigint"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedOn") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Capacity"); + + b.HasIndex("Interface"); + + b.HasIndex("OwnedMachineId"); + + b.HasIndex("Type"); + + b.ToTable("StorageByOwnedMachine"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("ClaimValue") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("ClaimValue") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("ProviderKey") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("ProviderDisplayName") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("RoleId") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("LoginProvider") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Name") + .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Value") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Audit", b => + { + b.HasOne("Marechai.Database.Models.ApplicationUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.Book", b => + { + b.HasOne("Marechai.Database.Models.Iso31661Numeric", "Country") + .WithMany("Books") + .HasForeignKey("CountryId"); + + b.HasOne("Marechai.Database.Models.Book", "Previous") + .WithOne("Next") + .HasForeignKey("Marechai.Database.Models.Book", "PreviousId"); + + b.HasOne("Marechai.Database.Models.Book", "Source") + .WithMany("Derivates") + .HasForeignKey("SourceId"); + }); + + modelBuilder.Entity("Marechai.Database.Models.BooksByMachine", b => + { + b.HasOne("Marechai.Database.Models.Book", "Book") + .WithMany("Machines") + .HasForeignKey("BookId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Machine", "Machine") + .WithMany("Books") + .HasForeignKey("MachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.BooksByMachineFamily", b => + { + b.HasOne("Marechai.Database.Models.Book", "Book") + .WithMany("MachineFamilies") + .HasForeignKey("BookId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.MachineFamily", "MachineFamily") + .WithMany("Books") + .HasForeignKey("MachineFamilyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.CompaniesByBook", b => + { + b.HasOne("Marechai.Database.Models.Book", "Book") + .WithMany("Companies") + .HasForeignKey("BookId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.DocumentCompany", "Company") + .WithMany("Books") + .HasForeignKey("CompanyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.DocumentRole", "Role") + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.CompaniesByDocument", b => + { + b.HasOne("Marechai.Database.Models.DocumentCompany", "Company") + .WithMany("Documents") + .HasForeignKey("CompanyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Document", "Document") + .WithMany("Companies") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.DocumentRole", "Role") + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.CompaniesByMagazine", b => + { + b.HasOne("Marechai.Database.Models.DocumentCompany", "Company") + .WithMany("Magazines") + .HasForeignKey("CompanyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Magazine", "Magazine") + .WithMany("Companies") + .HasForeignKey("MagazineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.DocumentRole", "Role") + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.Company", b => + { + b.HasOne("Marechai.Database.Models.Iso31661Numeric", "Country") + .WithMany("Companies") + .HasForeignKey("CountryId") + .HasConstraintName("fk_companies_country"); + + b.HasOne("Marechai.Database.Models.Company", "SoldTo") + .WithMany("InverseSoldToNavigation") + .HasForeignKey("SoldToId") + .HasConstraintName("fk_companies_sold_to"); + }); + + modelBuilder.Entity("Marechai.Database.Models.CompanyDescription", b => + { + b.HasOne("Marechai.Database.Models.Company", "Company") + .WithMany("Descriptions") + .HasForeignKey("CompanyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.CompanyLogo", b => + { + b.HasOne("Marechai.Database.Models.Company", "Company") + .WithMany("Logos") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_company_logos_company1") + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.CurrencyInflation", b => + { + b.HasOne("Marechai.Database.Models.Iso4217", "Currency") + .WithMany() + .HasForeignKey("CurrencyCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.CurrencyPegging", b => + { + b.HasOne("Marechai.Database.Models.Iso4217", "Destination") + .WithMany() + .HasForeignKey("DestinationCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Iso4217", "Source") + .WithMany() + .HasForeignKey("SourceCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.Document", b => + { + b.HasOne("Marechai.Database.Models.Iso31661Numeric", "Country") + .WithMany("Documents") + .HasForeignKey("CountryId"); + }); + + modelBuilder.Entity("Marechai.Database.Models.DocumentCompany", b => + { + b.HasOne("Marechai.Database.Models.Company", "Company") + .WithOne("DocumentCompany") + .HasForeignKey("Marechai.Database.Models.DocumentCompany", "CompanyId") + .OnDelete(DeleteBehavior.SetNull); + }); + + modelBuilder.Entity("Marechai.Database.Models.DocumentPerson", b => + { + b.HasOne("Marechai.Database.Models.Person", "Person") + .WithOne("DocumentPerson") + .HasForeignKey("Marechai.Database.Models.DocumentPerson", "PersonId") + .OnDelete(DeleteBehavior.SetNull); + }); + + modelBuilder.Entity("Marechai.Database.Models.DocumentsByMachine", b => + { + b.HasOne("Marechai.Database.Models.Document", "Document") + .WithMany("Machines") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Machine", "Machine") + .WithMany("Documents") + .HasForeignKey("MachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.DocumentsByMachineFamily", b => + { + b.HasOne("Marechai.Database.Models.Document", "Document") + .WithMany("MachineFamilies") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.MachineFamily", "MachineFamily") + .WithMany("Documents") + .HasForeignKey("MachineFamilyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.FileDataStream", b => + { + b.HasOne("Marechai.Database.Models.DbFile", "File") + .WithMany() + .HasForeignKey("FileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.FilesystemsByLogicalPartition", b => + { + b.HasOne("Marechai.Database.Models.Filesystem", "Filesystem") + .WithMany("Partitions") + .HasForeignKey("FilesystemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.LogicalPartition", "Partition") + .WithMany("Filesystems") + .HasForeignKey("PartitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.Gpu", b => + { + b.HasOne("Marechai.Database.Models.Company", "Company") + .WithMany("Gpus") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_gpus_company"); + }); + + modelBuilder.Entity("Marechai.Database.Models.GpusByMachine", b => + { + b.HasOne("Marechai.Database.Models.Gpu", "Gpu") + .WithMany("GpusByMachine") + .HasForeignKey("GpuId") + .HasConstraintName("fk_gpus_by_machine_gpu") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Machine", "Machine") + .WithMany("Gpus") + .HasForeignKey("MachineId") + .HasConstraintName("fk_gpus_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.GpusByOwnedMachine", b => + { + b.HasOne("Marechai.Database.Models.Gpu", "Gpu") + .WithMany() + .HasForeignKey("GpuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.OwnedMachine", "OwnedMachine") + .WithMany("Gpus") + .HasForeignKey("OwnedMachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.InstructionSetExtensionsByProcessor", b => + { + b.HasOne("Marechai.Database.Models.InstructionSetExtension", "Extension") + .WithMany("InstructionSetExtensionsByProcessor") + .HasForeignKey("ExtensionId") + .HasConstraintName("fk_extension_extension_id") + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Processor", "Processor") + .WithMany("InstructionSetExtensions") + .HasForeignKey("ProcessorId") + .HasConstraintName("fk_extension_processor_id") + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.Machine", b => + { + b.HasOne("Marechai.Database.Models.Company", "Company") + .WithMany("Machines") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_machines_company") + .IsRequired(); + + b.HasOne("Marechai.Database.Models.MachineFamily", "Family") + .WithMany("Machines") + .HasForeignKey("FamilyId") + .HasConstraintName("fk_machines_family"); + }); + + modelBuilder.Entity("Marechai.Database.Models.MachineFamily", b => + { + b.HasOne("Marechai.Database.Models.Company", "Company") + .WithMany("MachineFamilies") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_machine_families_company") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.MachinePhoto", b => + { + b.HasOne("Marechai.Database.Models.License", "License") + .WithMany("Photos") + .HasForeignKey("LicenseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Machine", "Machine") + .WithMany("Photos") + .HasForeignKey("MachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.ApplicationUser", "User") + .WithMany("Photos") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + }); + + modelBuilder.Entity("Marechai.Database.Models.Magazine", b => + { + b.HasOne("Marechai.Database.Models.Iso31661Numeric", "Country") + .WithMany("Magazines") + .HasForeignKey("CountryId"); + }); + + modelBuilder.Entity("Marechai.Database.Models.MagazineIssue", b => + { + b.HasOne("Marechai.Database.Models.Magazine", "Magazine") + .WithMany("Issues") + .HasForeignKey("MagazineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.MagazinesByMachine", b => + { + b.HasOne("Marechai.Database.Models.Machine", "Machine") + .WithMany("Magazines") + .HasForeignKey("MachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.MagazineIssue", "Magazine") + .WithMany("Machines") + .HasForeignKey("MagazineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.MagazinesByMachineFamily", b => + { + b.HasOne("Marechai.Database.Models.MachineFamily", "MachineFamily") + .WithMany("Magazines") + .HasForeignKey("MachineFamilyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.MagazineIssue", "Magazine") + .WithMany("MachineFamilies") + .HasForeignKey("MagazineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.MemoryByMachine", b => + { + b.HasOne("Marechai.Database.Models.Machine", "Machine") + .WithMany("Memory") + .HasForeignKey("MachineId") + .HasConstraintName("fk_memory_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.MemoryByOwnedMachine", b => + { + b.HasOne("Marechai.Database.Models.OwnedMachine", "OwnedMachine") + .WithMany("Memory") + .HasForeignKey("OwnedMachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.OwnedMachine", b => + { + b.HasOne("Marechai.Database.Models.Machine", "Machine") + .WithMany() + .HasForeignKey("MachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.ApplicationUser", "User") + .WithMany("OwnedMachines") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Marechai.Database.Models.OwnedMachinePhoto", b => + { + b.HasOne("Marechai.Database.Models.License", "License") + .WithMany("OwnedMachinePhotos") + .HasForeignKey("LicenseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.OwnedMachine", "OwnedMachine") + .WithMany("Photos") + .HasForeignKey("OwnedMachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.ApplicationUser", "User") + .WithMany("OwnedMachinePhotos") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Marechai.Database.Models.PeopleByBook", b => + { + b.HasOne("Marechai.Database.Models.Book", "Book") + .WithMany("People") + .HasForeignKey("BookId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.DocumentPerson", "Person") + .WithMany("Books") + .HasForeignKey("PersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.DocumentRole", "Role") + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.PeopleByCompany", b => + { + b.HasOne("Marechai.Database.Models.Company", "Company") + .WithMany("People") + .HasForeignKey("CompanyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Person", "Person") + .WithMany("Companies") + .HasForeignKey("PersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.PeopleByDocument", b => + { + b.HasOne("Marechai.Database.Models.Document", "Document") + .WithMany("People") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.DocumentPerson", "Person") + .WithMany("Documents") + .HasForeignKey("PersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.DocumentRole", "Role") + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.PeopleByMagazine", b => + { + b.HasOne("Marechai.Database.Models.MagazineIssue", "Magazine") + .WithMany("People") + .HasForeignKey("MagazineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.DocumentPerson", "Person") + .WithMany("Magazines") + .HasForeignKey("PersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.DocumentRole", "Role") + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.Person", b => + { + b.HasOne("Marechai.Database.Models.Iso31661Numeric", "CountryOfBirth") + .WithMany("People") + .HasForeignKey("CountryOfBirthId"); + }); + + modelBuilder.Entity("Marechai.Database.Models.Processor", b => + { + b.HasOne("Marechai.Database.Models.Company", "Company") + .WithMany("Processors") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_processors_company"); + + b.HasOne("Marechai.Database.Models.InstructionSet", "InstructionSet") + .WithMany("Processors") + .HasForeignKey("InstructionSetId") + .HasConstraintName("fk_processors_instruction_set"); + }); + + modelBuilder.Entity("Marechai.Database.Models.ProcessorsByMachine", b => + { + b.HasOne("Marechai.Database.Models.Machine", "Machine") + .WithMany("Processors") + .HasForeignKey("MachineId") + .HasConstraintName("fk_processors_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Processor", "Processor") + .WithMany("ProcessorsByMachine") + .HasForeignKey("ProcessorId") + .HasConstraintName("fk_processors_by_machine_processor") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.ProcessorsByOwnedMachine", b => + { + b.HasOne("Marechai.Database.Models.OwnedMachine", "OwnedMachine") + .WithMany("Processors") + .HasForeignKey("OwnedMachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Processor", "Processor") + .WithMany() + .HasForeignKey("ProcessorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.ResolutionsByGpu", b => + { + b.HasOne("Marechai.Database.Models.Gpu", "Gpu") + .WithMany("ResolutionsByGpu") + .HasForeignKey("GpuId") + .HasConstraintName("fk_resolutions_by_gpu_gpu") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Resolution", "Resolution") + .WithMany("ResolutionsByGpu") + .HasForeignKey("ResolutionId") + .HasConstraintName("fk_resolutions_by_gpu_resolution") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.ResolutionsByScreen", b => + { + b.HasOne("Marechai.Database.Models.Resolution", "Resolution") + .WithMany("ResolutionsByScreen") + .HasForeignKey("ResolutionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Screen", "Screen") + .WithMany("Resolutions") + .HasForeignKey("ScreenId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.Screen", b => + { + b.HasOne("Marechai.Database.Models.Resolution", "NativeResolution") + .WithMany("Screens") + .HasForeignKey("NativeResolutionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.ScreensByMachine", b => + { + b.HasOne("Marechai.Database.Models.Machine", "Machine") + .WithMany("Screens") + .HasForeignKey("MachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.Screen", "Screen") + .WithMany("ScreensByMachines") + .HasForeignKey("ScreenId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.SoundByMachine", b => + { + b.HasOne("Marechai.Database.Models.Machine", "Machine") + .WithMany("Sound") + .HasForeignKey("MachineId") + .HasConstraintName("fk_sound_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.SoundSynth", "SoundSynth") + .WithMany("SoundByMachine") + .HasForeignKey("SoundSynthId") + .HasConstraintName("fk_sound_by_machine_sound_synth") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.SoundByOwnedMachine", b => + { + b.HasOne("Marechai.Database.Models.OwnedMachine", "OwnedMachine") + .WithMany("Sound") + .HasForeignKey("OwnedMachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.SoundSynth", "SoundSynth") + .WithMany() + .HasForeignKey("SoundSynthId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.SoundSynth", b => + { + b.HasOne("Marechai.Database.Models.Company", "Company") + .WithMany("SoundSynths") + .HasForeignKey("CompanyId") + .HasConstraintName("fk_sound_synths_company"); + }); + + modelBuilder.Entity("Marechai.Database.Models.StorageByMachine", b => + { + b.HasOne("Marechai.Database.Models.Machine", "Machine") + .WithMany("Storage") + .HasForeignKey("MachineId") + .HasConstraintName("fk_storage_by_machine_machine") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Marechai.Database.Models.StorageByOwnedMachine", b => + { + b.HasOne("Marechai.Database.Models.OwnedMachine", "OwnedMachine") + .WithMany("Storage") + .HasForeignKey("OwnedMachineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Marechai.Database.Models.ApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Marechai.Database.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Marechai.Database.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Marechai.Database.Models.ApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Marechai.Database.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Marechai.Database.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Marechai.Database/Migrations/20200611000722_AddMedia.cs b/Marechai.Database/Migrations/20200611000722_AddMedia.cs new file mode 100644 index 00000000..55c36050 --- /dev/null +++ b/Marechai.Database/Migrations/20200611000722_AddMedia.cs @@ -0,0 +1,89 @@ +/****************************************************************************** +// MARECHAI: Master repository of computing history artifacts information +// ---------------------------------------------------------------------------- +// +// Author(s) : Natalia Portillo +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2003-2020 Natalia Portillo +*******************************************************************************/ + +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Marechai.Database.Migrations +{ + public partial class AddMedia : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable("Media", table => new + { + Id = table.Column(nullable: false). + Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CreatedOn = table.Column(nullable: false). + Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.IdentityColumn), + UpdatedOn = table.Column(nullable: false). + Annotation("MySql:ValueGenerationStrategy", + MySqlValueGenerationStrategy.ComputedColumn), + Title = table.Column(nullable: true), Sequence = table.Column(nullable: true), + LastSequence = table.Column(nullable: true), Type = table.Column(nullable: false), + WriteOffset = table.Column(nullable: true), Sides = table.Column(nullable: true), + Layers = table.Column(nullable: true), Sessions = table.Column(nullable: true), + Tracks = table.Column(nullable: true), Sectors = table.Column(nullable: false), + Size = table.Column(nullable: false), CopyProtection = table.Column(nullable: true), + PartNumber = table.Column(nullable: true), SerialNumber = table.Column(nullable: true), + Barcode = table.Column(nullable: true), CatalogueNumber = table.Column(nullable: true), + Manufacturer = table.Column(nullable: true), Model = table.Column(nullable: true), + Revision = table.Column(nullable: true), Firmware = table.Column(nullable: true), + PhysicalBlockSize = table.Column(nullable: true), + LogicalBlockSize = table.Column(nullable: true), BlockSizes = table.Column(nullable: true), + StorageInterface = table.Column(nullable: true) + }, constraints: table => + { + table.PrimaryKey("PK_Media", x => x.Id); + }); + + migrationBuilder.CreateIndex("IX_Media_Barcode", "Media", "Barcode"); + + migrationBuilder.CreateIndex("IX_Media_CatalogueNumber", "Media", "CatalogueNumber"); + + migrationBuilder.CreateIndex("IX_Media_CopyProtection", "Media", "CopyProtection"); + + migrationBuilder.CreateIndex("IX_Media_Firmware", "Media", "Firmware"); + + migrationBuilder.CreateIndex("IX_Media_Manufacturer", "Media", "Manufacturer"); + + migrationBuilder.CreateIndex("IX_Media_Model", "Media", "Model"); + + migrationBuilder.CreateIndex("IX_Media_PartNumber", "Media", "PartNumber"); + + migrationBuilder.CreateIndex("IX_Media_Revision", "Media", "Revision"); + + migrationBuilder.CreateIndex("IX_Media_SerialNumber", "Media", "SerialNumber"); + + migrationBuilder.CreateIndex("IX_Media_Title", "Media", "Title"); + + migrationBuilder.CreateIndex("IX_Media_Type", "Media", "Type"); + } + + protected override void Down(MigrationBuilder migrationBuilder) => migrationBuilder.DropTable("Media"); + } +} \ No newline at end of file diff --git a/Marechai.Database/Migrations/MarechaiContextModelSnapshot.cs b/Marechai.Database/Migrations/MarechaiContextModelSnapshot.cs index 646689fd..2876e7ba 100644 --- a/Marechai.Database/Migrations/MarechaiContextModelSnapshot.cs +++ b/Marechai.Database/Migrations/MarechaiContextModelSnapshot.cs @@ -1637,6 +1637,89 @@ namespace Marechai.Database.Migrations b.ToTable("marechai_db"); }); + modelBuilder.Entity("Marechai.Database.Models.Media", b => + { + b.Property("Id").ValueGeneratedOnAdd().HasColumnType("bigint unsigned"); + + b.Property("Barcode").HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("BlockSizes").HasColumnType("json"); + + b.Property("CatalogueNumber").HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("CopyProtection").HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)"); + + b.Property("Firmware").HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("LastSequence").HasColumnType("smallint unsigned"); + + b.Property("Layers").HasColumnType("smallint unsigned"); + + b.Property("LogicalBlockSize").HasColumnType("int"); + + b.Property("Manufacturer").HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Model").HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("PartNumber").HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("PhysicalBlockSize").HasColumnType("int"); + + b.Property("Revision").HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Sectors").HasColumnType("bigint unsigned"); + + b.Property("Sequence").HasColumnType("smallint unsigned"); + + b.Property("SerialNumber").HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Sessions").HasColumnType("smallint unsigned"); + + b.Property("Sides").HasColumnType("smallint unsigned"); + + b.Property("Size").HasColumnType("bigint unsigned"); + + b.Property("StorageInterface").HasColumnType("int"); + + b.Property("Title").HasColumnType("varchar(255) CHARACTER SET utf8mb4"); + + b.Property("Tracks").HasColumnType("smallint unsigned"); + + b.Property("Type").HasColumnType("int unsigned"); + + b.Property("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)"); + + b.Property("WriteOffset").HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Barcode"); + + b.HasIndex("CatalogueNumber"); + + b.HasIndex("CopyProtection"); + + b.HasIndex("Firmware"); + + b.HasIndex("Manufacturer"); + + b.HasIndex("Model"); + + b.HasIndex("PartNumber"); + + b.HasIndex("Revision"); + + b.HasIndex("SerialNumber"); + + b.HasIndex("Title"); + + b.HasIndex("Type"); + + b.ToTable("Media"); + }); + modelBuilder.Entity("Marechai.Database.Models.MemoryByMachine", b => { b.Property("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("bigint(20)"); diff --git a/Marechai.Database/Models/MarechaiContext.cs b/Marechai.Database/Models/MarechaiContext.cs index b4a4e8b4..82ecc9da 100644 --- a/Marechai.Database/Models/MarechaiContext.cs +++ b/Marechai.Database/Models/MarechaiContext.cs @@ -110,6 +110,8 @@ namespace Marechai.Database.Models public virtual DbSet FileDataStreams { get; set; } public virtual DbSet Filesystems { get; set; } public virtual DbSet LogicalPartitions { get; set; } + public virtual DbSet FilesystemsByLogicalPartition { get; set; } + public virtual DbSet Media { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { @@ -1655,6 +1657,21 @@ namespace Marechai.Database.Models entity.HasOne(d => d.Filesystem).WithMany(p => p.Partitions).OnDelete(DeleteBehavior.Cascade); }); + + modelBuilder.Entity(entity => + { + entity.HasIndex(e => e.Title); + entity.HasIndex(e => e.Type); + entity.HasIndex(e => e.CopyProtection); + entity.HasIndex(e => e.PartNumber); + entity.HasIndex(e => e.SerialNumber); + entity.HasIndex(e => e.Barcode); + entity.HasIndex(e => e.CatalogueNumber); + entity.HasIndex(e => e.Manufacturer); + entity.HasIndex(e => e.Model); + entity.HasIndex(e => e.Revision); + entity.HasIndex(e => e.Firmware); + }); } } } \ No newline at end of file diff --git a/Marechai.Database/Models/Media.cs b/Marechai.Database/Models/Media.cs new file mode 100644 index 00000000..12a551ad --- /dev/null +++ b/Marechai.Database/Models/Media.cs @@ -0,0 +1,58 @@ +/****************************************************************************** +// MARECHAI: Master repository of computing history artifacts information +// ---------------------------------------------------------------------------- +// +// Author(s) : Natalia Portillo +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2003-2020 Natalia Portillo +*******************************************************************************/ + +using System; +using Aaru.CommonTypes; + +namespace Marechai.Database.Models +{ + public class Media : BaseModel + { + public string Title { get; set; } + public ushort? Sequence { get; set; } + public ushort? LastSequence { get; set; } + public MediaType Type { get; set; } + public int? WriteOffset { get; set; } + public ushort? Sides { get; set; } + public ushort? Layers { get; set; } + public ushort? Sessions { get; set; } + public ushort? Tracks { get; set; } + public ulong Sectors { get; set; } + public ulong Size { get; set; } + public string CopyProtection { get; set; } + public string PartNumber { get; set; } + public string SerialNumber { get; set; } + public string Barcode { get; set; } + public string CatalogueNumber { get; set; } + public string Manufacturer { get; set; } + public string Model { get; set; } + public string Revision { get; set; } + public string Firmware { get; set; } + public int? PhysicalBlockSize { get; set; } + public int? LogicalBlockSize { get; set; } + public JsonObject BlockSizes { get; set; } + public StorageInterface? StorageInterface { get; set; } + } +} \ No newline at end of file diff --git a/Marechai.Database/Models/VariableBlockSize.cs b/Marechai.Database/Models/VariableBlockSize.cs new file mode 100644 index 00000000..08347c96 --- /dev/null +++ b/Marechai.Database/Models/VariableBlockSize.cs @@ -0,0 +1,35 @@ +/****************************************************************************** +// MARECHAI: Master repository of computing history artifacts information +// ---------------------------------------------------------------------------- +// +// Author(s) : Natalia Portillo +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2003-2020 Natalia Portillo +*******************************************************************************/ + +namespace Marechai.Database.Models +{ + // Not for a table + public class VariableBlockSize + { + public ulong Start { get; set; } + public ulong End { get; set; } + public uint Size { get; set; } + } +} \ No newline at end of file diff --git a/Marechai.sln b/Marechai.sln index 03913011..c67b4422 100644 --- a/Marechai.sln +++ b/Marechai.sln @@ -4,6 +4,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Marechai", "Marechai\Marech EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Marechai.Database", "Marechai.Database\Marechai.Database.csproj", "{F914D5B9-0C7F-4A40-B187-269B83497AF8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.CommonTypes", "Aaru.CommonTypes\Aaru.CommonTypes.csproj", "{F2B84194-26EB-4227-B1C5-6602517E85AE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Console", "Aaru.Console\Aaru.Console.csproj", "{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Helpers", "Aaru.Helpers\Aaru.Helpers.csproj", "{F8BDF57B-1571-4CD0-84B3-B422088D359A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -18,5 +24,17 @@ Global {F914D5B9-0C7F-4A40-B187-269B83497AF8}.Debug|Any CPU.Build.0 = Debug|Any CPU {F914D5B9-0C7F-4A40-B187-269B83497AF8}.Release|Any CPU.ActiveCfg = Release|Any CPU {F914D5B9-0C7F-4A40-B187-269B83497AF8}.Release|Any CPU.Build.0 = Release|Any CPU + {F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|Any CPU.Build.0 = Release|Any CPU + {CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Release|Any CPU.Build.0 = Release|Any CPU + {F8BDF57B-1571-4CD0-84B3-B422088D359A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F8BDF57B-1571-4CD0-84B3-B422088D359A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/Marechai/Marechai.csproj b/Marechai/Marechai.csproj index 65634fa0..bd0556ab 100644 --- a/Marechai/Marechai.csproj +++ b/Marechai/Marechai.csproj @@ -2,7 +2,7 @@ netcoreapp3.1 - 4.0.0.1677 + 4.0.0.1681 Canary Islands Computer Museum Copyright © 2003-2020 Natalia Portillo Canary Islands Computer Museum Website