mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Compare commits
80 Commits
snyk-fix-8
...
9847c987b5
| Author | SHA1 | Date | |
|---|---|---|---|
|
9847c987b5
|
|||
|
6f0de86be4
|
|||
|
37d8df4b7d
|
|||
|
860fd99b00
|
|||
|
2ba7d86e71
|
|||
|
37403e5e53
|
|||
|
2066e211e1
|
|||
|
ebc611e5d2
|
|||
|
5e3be9cbb0
|
|||
|
9d146eb151
|
|||
|
52b6145a8b
|
|||
|
09ced17903
|
|||
|
356674f51f
|
|||
|
cd4aa5767d
|
|||
|
cf24356030
|
|||
|
f85dc22bf6
|
|||
|
795f5ba27d
|
|||
|
059417f0dc
|
|||
|
5b4a1b42e0
|
|||
|
e9a2a68e49
|
|||
|
7c29302153
|
|||
|
76bebc68b7
|
|||
|
4a2d46f3b0
|
|||
|
e9da9c7a3f
|
|||
|
b81c628f07
|
|||
|
6fc709a271
|
|||
|
507e5686e4
|
|||
|
27e5616da8
|
|||
|
464f52878b
|
|||
|
f6214e6d14
|
|||
|
baaf571505
|
|||
|
8d6c382754
|
|||
|
e171b8ddd8
|
|||
|
6981075c4a
|
|||
|
bed72102e8
|
|||
|
d301315fbf
|
|||
|
79f0d2632b
|
|||
|
0ba1a24b4e
|
|||
|
583f20ff99
|
|||
|
1826c70883
|
|||
|
34d76fd646
|
|||
|
fc6238aef1
|
|||
|
505ace535f
|
|||
|
a715d936eb
|
|||
|
e4c2837ad9
|
|||
|
36520596da
|
|||
|
764e058f79
|
|||
|
349b396588
|
|||
|
d0e5725ae0
|
|||
|
0bbf821489
|
|||
|
10017850f8
|
|||
|
d9239f39c0
|
|||
|
f445006e46
|
|||
|
3520e49b25
|
|||
|
268c8fab07
|
|||
|
e9e3ef2ab0
|
|||
|
6962be93a4
|
|||
|
be83594ea9
|
|||
|
b1f32e6f13
|
|||
|
c73c4d839a
|
|||
|
d7c61b2fdd
|
|||
|
a942d40849
|
|||
|
6c01b2128f
|
|||
|
e14bfba354
|
|||
|
d2c71d350d
|
|||
|
eb7c0a6858
|
|||
|
8f6d334af4
|
|||
|
1d67081792
|
|||
|
f304448fdb
|
|||
|
88307edc9a
|
|||
|
51d0809536
|
|||
|
8e07b6587b
|
|||
|
4f2435fcbd
|
|||
|
3fac917422
|
|||
|
096865dc3b
|
|||
|
29ec7571fe
|
|||
|
fc893ee08b
|
|||
|
cf7f830aad
|
|||
|
8213e4ad80
|
|||
|
e974a77e46
|
39
.appmod/.appcat/assessment-config.json
Normal file
39
.appmod/.appcat/assessment-config.json
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
You can edit this file to configure the application assessment. Please note that any changes saved to this file will be applied the next time you run the assessment.
|
||||||
|
|
||||||
|
The configurable AppCAT arguments
|
||||||
|
|
||||||
|
- target: target Azure compute service to run the apps on. Choosing "Any" if you haven't decided which one to use and later you can choose and compare on the assessment report.
|
||||||
|
| Target | Description |
|
||||||
|
|-----------------------------------|--------------------------------------------------------------------|
|
||||||
|
| Any | Discover issues for all supported targets here. |
|
||||||
|
| AKS.Windows | Best practices for Azure Kubernetes Service (Windows). |
|
||||||
|
| AKS.Linux | Best practices for Azure Kubernetes Service (Linux). |
|
||||||
|
| AppService.Windows | Best practices for Azure App Service (Windows). |
|
||||||
|
| AppService.Linux | Best practices for Azure App Service (Linux). |
|
||||||
|
| AppServiceContainer.Windows | Best practices for Azure App Service Container (Windows). |
|
||||||
|
| AppServiceContainer.Linux | Best practices for Azure App Service Container (Linux). |
|
||||||
|
| AppServiceManagedInstance.Windows | Best practices for Azure App Service Managed Instance (Windows). |
|
||||||
|
| ACA | Best practices for Azure Container Apps. |
|
||||||
|
|
||||||
|
Two examples on how to configure properly.
|
||||||
|
|
||||||
|
Example one: you'd like to migrate your apps to Azure but haven't decided on the target compute service yet.
|
||||||
|
{
|
||||||
|
"appcat": {
|
||||||
|
"target": "Any"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Example two: you'd like to migrate your apps to App Service Linux and want to understand what are the issues to be fixed.
|
||||||
|
{
|
||||||
|
"appcat": {
|
||||||
|
"target": "AppService.Linux"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
"appcat": {
|
||||||
|
"target": "Any"
|
||||||
|
}
|
||||||
|
}
|
||||||
601577
.appmod/.appcat/output_20251113_014740.json
Normal file
601577
.appmod/.appcat/output_20251113_014740.json
Normal file
File diff suppressed because one or more lines are too long
68
.appmod/.migration/plan.md
Normal file
68
.appmod/.migration/plan.md
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
# .NET Modernization Plan: Local MariaDB Application
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
Complete modernization of Marechai application from .NET 5 to .NET 9 with dependency updates and local credential security.
|
||||||
|
|
||||||
|
## Goals
|
||||||
|
1. Upgrade from .NET 5.0 to .NET 9.0
|
||||||
|
2. Update all NuGet packages to latest compatible versions
|
||||||
|
3. Fix security vulnerabilities (SkiaSharp CVE)
|
||||||
|
4. Remove deprecated dependencies (Application Insights)
|
||||||
|
5. Implement secure local credential storage using Data Protection API
|
||||||
|
6. Maintain all MariaDB functionality and local-only architecture
|
||||||
|
|
||||||
|
## Projects
|
||||||
|
- **Marechai.Database.csproj** - Class library (net5.0 → net9.0)
|
||||||
|
- **Marechai.csproj** - ASP.NET Core app (net5.0 → net9.0)
|
||||||
|
|
||||||
|
## Migration Tasks
|
||||||
|
|
||||||
|
### Task 1: Upgrade .NET Framework
|
||||||
|
- Update Marechai.Database.csproj target framework from net5.0 to net9.0
|
||||||
|
- Update Marechai.csproj target framework from net5.0 to net9.0
|
||||||
|
- Verify framework migration compatibility
|
||||||
|
|
||||||
|
### Task 2: Update Critical NuGet Packages
|
||||||
|
|
||||||
|
#### Marechai.Database.csproj
|
||||||
|
- Microsoft.AspNetCore.Identity.EntityFrameworkCore: 5.0.1 → 9.0.11
|
||||||
|
- Microsoft.EntityFrameworkCore.Design: 5.0.1 → 9.0.11
|
||||||
|
- Microsoft.EntityFrameworkCore.Proxies: 5.0.1 → 9.0.11
|
||||||
|
|
||||||
|
#### Marechai.csproj
|
||||||
|
- Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore: 5.0.1 → 9.0.11
|
||||||
|
- Microsoft.AspNetCore.Identity.EntityFrameworkCore: 5.0.1 → 9.0.11
|
||||||
|
- Microsoft.AspNetCore.Identity.UI: 5.0.1 → 9.0.11
|
||||||
|
- Microsoft.EntityFrameworkCore.Proxies: 5.0.1 → 9.0.11
|
||||||
|
- Microsoft.EntityFrameworkCore.Tools: 5.0.1 → 9.0.11
|
||||||
|
- Microsoft.VisualStudio.Web.CodeGeneration.Design: 5.0.1 → 9.0.0
|
||||||
|
- SkiaSharp: 2.80.2 → 3.119.1
|
||||||
|
- SkiaSharp.NativeAssets.Linux: 2.80.2 → 3.119.1
|
||||||
|
|
||||||
|
### Task 3: Remove Deprecated Packages
|
||||||
|
- Microsoft.ApplicationInsights.AspNetCore: 2.16.0 (deprecated)
|
||||||
|
|
||||||
|
### Task 4: Implement Local Credential Encryption
|
||||||
|
- Add Data Protection API configuration in appsettings.json
|
||||||
|
- Create credential encryption utility for DPAPI integration
|
||||||
|
- Update connection string handling in Program.cs
|
||||||
|
- Add encrypted credential support in Startup.cs
|
||||||
|
- Ensure backward compatibility with existing deployments
|
||||||
|
|
||||||
|
## Execution Order
|
||||||
|
1. Upgrade .NET framework versions
|
||||||
|
2. Update NuGet packages
|
||||||
|
3. Fix security vulnerabilities
|
||||||
|
4. Remove deprecated dependencies
|
||||||
|
5. Implement credential encryption
|
||||||
|
6. Comprehensive testing and validation
|
||||||
|
7. Commit all changes
|
||||||
|
|
||||||
|
## Success Criteria
|
||||||
|
- ✅ Both projects target .NET 9.0
|
||||||
|
- ✅ All recommended packages updated
|
||||||
|
- ✅ SkiaSharp security vulnerability fixed
|
||||||
|
- ✅ Application Insights deprecated package removed
|
||||||
|
- ✅ Credentials can be securely stored locally
|
||||||
|
- ✅ Build succeeds with no errors
|
||||||
|
- ✅ All changes committed to git
|
||||||
87
.appmod/.migration/progress.md
Normal file
87
.appmod/.migration/progress.md
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
# Migration Progress Tracking
|
||||||
|
|
||||||
|
## Current Status: COMPLETED ✅
|
||||||
|
|
||||||
|
### Completed Steps
|
||||||
|
- ✅ Branch created for .NET 5.0 → .NET 9.0 migration
|
||||||
|
- ✅ Migration plan and progress files created
|
||||||
|
- ✅ Marechai.Database.csproj upgraded to net9.0
|
||||||
|
- ✅ Marechai.csproj upgraded to net9.0
|
||||||
|
- ✅ Entity Framework Core packages updated to 9.0.11
|
||||||
|
- ✅ SkiaSharp security vulnerability fixed (2.80.2 → 3.119.1)
|
||||||
|
- ✅ Deprecated Application Insights removed
|
||||||
|
- ✅ Credential encryption implemented via Data Protection API
|
||||||
|
- ✅ Build successful with no errors
|
||||||
|
- ✅ All changes committed to git
|
||||||
|
|
||||||
|
## Detailed Task Status
|
||||||
|
|
||||||
|
### Framework Upgrade
|
||||||
|
- [x] Marechai.Database.csproj: net5.0 → net9.0
|
||||||
|
- [x] Marechai.csproj: net5.0 → net9.0
|
||||||
|
|
||||||
|
### Package Updates - Marechai.Database.csproj
|
||||||
|
- [x] Microsoft.AspNetCore.Identity.EntityFrameworkCore: 5.0.1 → 9.0.11
|
||||||
|
- [x] Microsoft.EntityFrameworkCore.Design: 5.0.1 → 9.0.11
|
||||||
|
- [x] Microsoft.EntityFrameworkCore.Proxies: 5.0.1 → 9.0.11
|
||||||
|
|
||||||
|
### Package Updates - Marechai.csproj
|
||||||
|
- [x] Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore: 5.0.1 → 9.0.11
|
||||||
|
- [x] Microsoft.AspNetCore.Identity.EntityFrameworkCore: 5.0.1 → 9.0.11
|
||||||
|
- [x] Microsoft.AspNetCore.Identity.UI: 5.0.1 → 9.0.11
|
||||||
|
- [x] Microsoft.EntityFrameworkCore.Proxies: 5.0.1 → 9.0.11
|
||||||
|
- [x] Microsoft.EntityFrameworkCore.Tools: 5.0.1 → 9.0.11
|
||||||
|
- [x] Microsoft.VisualStudio.Web.CodeGeneration.Design: 5.0.1 → 9.0.0
|
||||||
|
- [x] SkiaSharp: 2.80.2 → 3.119.1
|
||||||
|
- [x] SkiaSharp.NativeAssets.Linux: 2.80.2 → 3.119.1
|
||||||
|
|
||||||
|
### Deprecated Packages
|
||||||
|
- [x] Removed Microsoft.ApplicationInsights.AspNetCore: 2.16.0
|
||||||
|
|
||||||
|
### Credential Encryption
|
||||||
|
- [x] Added DPAPI configuration via Data Protection API
|
||||||
|
- [x] Created CredentialEncryptor helper class
|
||||||
|
- [x] Created ConnectionStringManager for connection string handling
|
||||||
|
- [x] Updated Startup.cs with credential encryption services
|
||||||
|
- [x] Implemented secure credential handling with fallback support
|
||||||
|
|
||||||
|
## Modernization Summary
|
||||||
|
|
||||||
|
### What Was Accomplished
|
||||||
|
1. **Framework Upgrade**: Both projects successfully migrated from .NET 5.0 to .NET 9.0
|
||||||
|
2. **Package Updates**: All critical NuGet packages updated to latest compatible versions
|
||||||
|
3. **Security Fixes**: SkiaSharp CVE vulnerability fixed with upgrade to 3.119.1
|
||||||
|
4. **Deprecated Dependencies**: Removed Application Insights (2.16.0) which was deprecated
|
||||||
|
5. **Local Credential Encryption**: Implemented ASP.NET Core Data Protection API for secure credential storage
|
||||||
|
6. **Backward Compatibility**: Existing plaintext credentials continue to work
|
||||||
|
|
||||||
|
### Files Modified
|
||||||
|
- Marechai.Database/Marechai.Database.csproj
|
||||||
|
- Marechai/Marechai.csproj
|
||||||
|
- Marechai/Startup.cs
|
||||||
|
- Marechai/Pages/_Host.cshtml
|
||||||
|
|
||||||
|
### Files Created
|
||||||
|
- Marechai/Helpers/CredentialEncryptor.cs
|
||||||
|
- Marechai/Helpers/ConnectionStringManager.cs
|
||||||
|
- Marechai/CREDENTIAL_ENCRYPTION_GUIDE.md
|
||||||
|
- .appmod/.migration/plan.md
|
||||||
|
- .appmod/.migration/progress.md
|
||||||
|
|
||||||
|
## Build Status
|
||||||
|
✅ **Build Successful** - No compilation errors
|
||||||
|
|
||||||
|
## Architecture Notes
|
||||||
|
- All credential encryption is LOCAL-ONLY using Data Protection API (DPAPI)
|
||||||
|
- No cloud services or Azure dependencies required
|
||||||
|
- MariaDB database remains local and unchanged
|
||||||
|
- Backward compatible with existing configurations
|
||||||
|
- Graceful fallback from encrypted to plaintext credentials
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
1. Test the application with existing MariaDB connection
|
||||||
|
2. Deploy to production environment
|
||||||
|
3. (Optional) Encrypt connection strings in production using the provided guide
|
||||||
|
|
||||||
|
## Last Updated
|
||||||
|
2024-11-13 01:58:16
|
||||||
2101
.editorconfig
2101
.editorconfig
File diff suppressed because it is too large
Load Diff
2
.gitignore
vendored
2
.gitignore
vendored
@@ -442,6 +442,8 @@ $RECYCLE.BIN/
|
|||||||
|
|
||||||
|
|
||||||
# Assets
|
# Assets
|
||||||
|
Marechai/originals
|
||||||
|
Marechai/wwwroot/assets/photos
|
||||||
Marechai/wwwroot/assets/**/*.jpeg
|
Marechai/wwwroot/assets/**/*.jpeg
|
||||||
Marechai/wwwroot/assets/**/*.svg
|
Marechai/wwwroot/assets/**/*.svg
|
||||||
Marechai/wwwroot/assets/**/*.png
|
Marechai/wwwroot/assets/**/*.png
|
||||||
|
|||||||
3
.idea/.idea.Marechai/.idea/indexLayout.xml
generated
3
.idea/.idea.Marechai/.idea/indexLayout.xml
generated
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ContentModelUserStore">
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders />
|
||||||
<explicitIncludes />
|
<explicitIncludes />
|
||||||
<explicitExcludes />
|
<explicitExcludes />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
8
.idea/.idea.Marechai/.idea/modules.xml
generated
8
.idea/.idea.Marechai/.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.Marechai/.idea/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.Marechai/.idea/riderModule.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
14
.idea/.idea.Marechai/riderModule.iml
generated
14
.idea/.idea.Marechai/riderModule.iml
generated
@@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="RIDER_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$/../.." />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
<orderEntry type="library" name="R User Library" level="project" />
|
|
||||||
<orderEntry type="library" name="R Skeletons" level="application" />
|
|
||||||
<orderEntry type="library" name="bootstrap" level="application" />
|
|
||||||
<orderEntry type="library" name="all" level="application" />
|
|
||||||
<orderEntry type="library" name="jquery-3.3.1.slim" level="application" />
|
|
||||||
<orderEntry type="library" name="popper.js" level="application" />
|
|
||||||
<orderEntry type="library" name="analytics" level="application" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
@@ -1,27 +1,34 @@
|
|||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
## Commit signature
|
## Commit signature
|
||||||
|
|
||||||
For security reason we require all commits to be cryptographically signed.
|
For security reason we require all commits to be cryptographically signed.
|
||||||
This section explains how to setup the development environment for that purpose.
|
This section explains how to setup the development environment for that purpose.
|
||||||
|
|
||||||
### Visual Studio and Visual Studio Code for Windows
|
### Visual Studio and Visual Studio Code for Windows
|
||||||
You need to install Git for Windows. It is available as a component of Visual Studio, or separately in https://gitforwindows.org.
|
|
||||||
|
You need to install Git for Windows. It is available as a component of Visual Studio, or separately
|
||||||
|
in https://gitforwindows.org.
|
||||||
|
|
||||||
You also need to install Gpg4win from https://www.gpg4win.org. Ensure to select the Kleopatra component.
|
You also need to install Gpg4win from https://www.gpg4win.org. Ensure to select the Kleopatra component.
|
||||||
|
|
||||||
Once you have them installed, open Kleopatra and generate a new key pair, of OpenPGP type, following the instructions [here](https://www.gpg4win.org/doc/en/gpg4win-compendium_12.html).
|
Once you have them installed, open Kleopatra and generate a new key pair, of OpenPGP type, following the
|
||||||
|
instructions [here](https://www.gpg4win.org/doc/en/gpg4win-compendium_12.html).
|
||||||
Save aside the fingerprint, you'll need it later.
|
Save aside the fingerprint, you'll need it later.
|
||||||
|
|
||||||
Now go to environment variables (in the properties of your computer) and add this to the path:
|
Now go to environment variables (in the properties of your computer) and add this to the path:
|
||||||
`C:\Program Files\Git\usr\bin`
|
`C:\Program Files\Git\usr\bin`
|
||||||
|
|
||||||
Finally, open Git Bash, and write the following commands if you want all git commits to be signed:
|
Finally, open Git Bash, and write the following commands if you want all git commits to be signed:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git config --global commit.gpgsign true
|
git config --global commit.gpgsign true
|
||||||
git config --global user.signingkey <FINGERPRINT>
|
git config --global user.signingkey <FINGERPRINT>
|
||||||
git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
|
git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
|
||||||
```
|
```
|
||||||
|
|
||||||
or if you want the options to apply only for this project
|
or if you want the options to apply only for this project
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /DRIVE/PATH_TO_PROJECT
|
cd /DRIVE/PATH_TO_PROJECT
|
||||||
git config commit.gpgsign true
|
git config commit.gpgsign true
|
||||||
@@ -29,8 +36,11 @@ git config user.signingkey FINGERPRINT
|
|||||||
git config gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
|
git config gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
|
||||||
```
|
```
|
||||||
|
|
||||||
replacing `FINGERPRINT` with the fingerprint you saved from the key generation, `DRIVE` with the drive letter and `PATH_TO_PROJECT` using `/` as path separator.
|
replacing `FINGERPRINT` with the fingerprint you saved from the key generation, `DRIVE` with the drive letter and
|
||||||
|
`PATH_TO_PROJECT` using `/` as path separator.
|
||||||
|
|
||||||
Once this is done, every time you commit in VS / VSCode, a message box titled `pinentry-qt` will ask for the passphrase you set up earlier and sign the commit with your key.
|
Once this is done, every time you commit in VS / VSCode, a message box titled `pinentry-qt` will ask for the passphrase
|
||||||
|
you set up earlier and sign the commit with your key.
|
||||||
|
|
||||||
For GitHub to recognize your signature you need to follow the steps [here](https://help.github.com/en/github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account).
|
For GitHub to recognize your signature you need to follow the
|
||||||
|
steps [here](https://help.github.com/en/github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account).
|
||||||
18
Directory.Build.props
Normal file
18
Directory.Build.props
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework Condition="'$(MSBuildProjectName)' != 'Marechai.App'">net10.0</TargetFramework>
|
||||||
|
<Company>Canary Islands Computer Museum</Company>
|
||||||
|
<Copyright>Copyright © 2003-2026 Natalia Portillo</Copyright>
|
||||||
|
<Product>Canary Islands Computer Museum Website</Product>
|
||||||
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- Common duplicated packages -->
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore"/>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies"/>
|
||||||
|
<PackageReference Include="Packaging.Targets">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
1
Directory.Build.targets
Normal file
1
Directory.Build.targets
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<Project></Project>
|
||||||
36
Directory.Packages.props
Normal file
36
Directory.Packages.props
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- Duplicated packages (also in Directory.Build.props) -->
|
||||||
|
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.11"/>
|
||||||
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Proxies" Version="9.0.11"/>
|
||||||
|
<!-- Unique to Marechai.csproj -->
|
||||||
|
<PackageVersion Include="Blazorise.Bootstrap" Version="0.9.2.4"/>
|
||||||
|
<PackageVersion Include="Blazorise.Icons.FontAwesome" Version="0.9.2.4"/>
|
||||||
|
<PackageVersion Include="Markdig" Version="0.22.1"/>
|
||||||
|
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="9.0.11"/>
|
||||||
|
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="9.0.11"/>
|
||||||
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.11"/>
|
||||||
|
<PackageVersion Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="9.0.0"/>
|
||||||
|
<PackageVersion Include="MySql.Data" Version="8.0.22"/>
|
||||||
|
<PackageVersion Include="SkiaSharp" Version="3.119.1"/>
|
||||||
|
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="3.119.1"/>
|
||||||
|
<PackageVersion Include="Svg.Skia" Version="0.4.1"/>
|
||||||
|
<PackageVersion Include="Tewr.Blazor.FileReader" Version="3.0.0.20340"/>
|
||||||
|
<PackageVersion Include="Unclassified.NetRevisionTask" Version="0.3.0"/>
|
||||||
|
<!-- Unique to Marechai.Database.csproj -->
|
||||||
|
<PackageVersion Include="Aaru.CommonTypes" Version="5.4.1"/>
|
||||||
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.11"/>
|
||||||
|
<PackageVersion Include="Pomelo.EntityFrameworkCore.MySql" Version="9.0.0"/>
|
||||||
|
<PackageVersion Include="Pomelo.EntityFrameworkCore.MySql.Json.Microsoft" Version="9.0.0"/>
|
||||||
|
<!-- Build infrastructure -->
|
||||||
|
<PackageVersion Include="Packaging.Targets" Version="0.1.189"/>
|
||||||
|
<!-- Unique to Marechai.Server.csproj -->
|
||||||
|
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0"/>
|
||||||
|
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.11"/>
|
||||||
|
<PackageVersion Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.11"/>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
BIN
Documentation/Software Architecture Document.pdf
Normal file
BIN
Documentation/Software Architecture Document.pdf
Normal file
Binary file not shown.
19
Marechai.App/App.xaml
Normal file
19
Marechai.App/App.xaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<Application x:Class="Marechai.App.App"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
|
<Application.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<!-- Load WinUI resources -->
|
||||||
|
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
|
||||||
|
<!-- Load Uno.UI.Toolkit resources -->
|
||||||
|
<ToolkitResources xmlns="using:Uno.Toolkit.UI" />
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<!-- Add resources here -->
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||
|
</Application.Resources>
|
||||||
|
|
||||||
|
</Application>
|
||||||
114
Marechai.App/App.xaml.cs
Normal file
114
Marechai.App/App.xaml.cs
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
using System.Net.Http;
|
||||||
|
using Microsoft.UI.Xaml;
|
||||||
|
using Uno.Extensions;
|
||||||
|
using Uno.Extensions.Configuration;
|
||||||
|
using Uno.Extensions.Hosting;
|
||||||
|
using Uno.Extensions.Localization;
|
||||||
|
using Uno.Extensions.Navigation;
|
||||||
|
using Uno.Resizetizer;
|
||||||
|
using Uno.UI;
|
||||||
|
|
||||||
|
namespace Marechai.App;
|
||||||
|
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes the singleton application object. This is the first line of authored code
|
||||||
|
/// executed, and as such is the logical equivalent of main() or WinMain().
|
||||||
|
/// </summary>
|
||||||
|
public App()
|
||||||
|
{
|
||||||
|
this.InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Window? MainWindow { get; private set; }
|
||||||
|
protected IHost? Host { get; private set; }
|
||||||
|
|
||||||
|
protected async override void OnLaunched(LaunchActivatedEventArgs args)
|
||||||
|
{
|
||||||
|
var builder = this.CreateBuilder(args)
|
||||||
|
// Add navigation support for toolkit controls such as TabBar and NavigationView
|
||||||
|
.UseToolkitNavigation()
|
||||||
|
.Configure(host => host
|
||||||
|
#if DEBUG
|
||||||
|
// Switch to Development environment when running in DEBUG
|
||||||
|
.UseEnvironment(Environments.Development)
|
||||||
|
#endif
|
||||||
|
.UseLogging(configure: (context, logBuilder) =>
|
||||||
|
{
|
||||||
|
// Configure log levels for different categories of logging
|
||||||
|
logBuilder
|
||||||
|
.SetMinimumLevel(
|
||||||
|
context.HostingEnvironment.IsDevelopment() ? LogLevel.Information : LogLevel.Warning)
|
||||||
|
|
||||||
|
// Default filters for core Uno Platform namespaces
|
||||||
|
.CoreLogLevel(LogLevel.Warning);
|
||||||
|
|
||||||
|
// Uno Platform namespace filter groups
|
||||||
|
// Uncomment individual methods to see more detailed logging
|
||||||
|
//// Generic Xaml events
|
||||||
|
//logBuilder.XamlLogLevel(LogLevel.Debug);
|
||||||
|
//// Layout specific messages
|
||||||
|
//logBuilder.XamlLayoutLogLevel(LogLevel.Debug);
|
||||||
|
//// Storage messages
|
||||||
|
//logBuilder.StorageLogLevel(LogLevel.Debug);
|
||||||
|
//// Binding related messages
|
||||||
|
//logBuilder.XamlBindingLogLevel(LogLevel.Debug);
|
||||||
|
//// Binder memory references tracking
|
||||||
|
//logBuilder.BinderMemoryReferenceLogLevel(LogLevel.Debug);
|
||||||
|
//// DevServer and HotReload related
|
||||||
|
//logBuilder.HotReloadCoreLogLevel(LogLevel.Information);
|
||||||
|
//// Debug JS interop
|
||||||
|
//logBuilder.WebAssemblyLogLevel(LogLevel.Debug);
|
||||||
|
}, enableUnoLogging: true)
|
||||||
|
.UseSerilog(consoleLoggingEnabled: true, fileLoggingEnabled: true)
|
||||||
|
.UseConfiguration(configure: configBuilder =>
|
||||||
|
configBuilder
|
||||||
|
.EmbeddedSource<App>()
|
||||||
|
.Section<AppConfig>()
|
||||||
|
)
|
||||||
|
// Enable localization (see appsettings.json for supported languages)
|
||||||
|
.UseLocalization()
|
||||||
|
.UseHttp((context, services) =>
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
// DelegatingHandler will be automatically injected
|
||||||
|
services.AddTransient<DelegatingHandler, DebugHttpHandler>();
|
||||||
|
#endif
|
||||||
|
})
|
||||||
|
.ConfigureServices((context, services) =>
|
||||||
|
{
|
||||||
|
// TODO: Register your services
|
||||||
|
//services.AddSingleton<IMyService, MyService>();
|
||||||
|
})
|
||||||
|
.UseNavigation(RegisterRoutes)
|
||||||
|
);
|
||||||
|
MainWindow = builder.Window;
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
MainWindow.UseStudio();
|
||||||
|
#endif
|
||||||
|
MainWindow.SetWindowIcon();
|
||||||
|
|
||||||
|
Host = await builder.NavigateAsync<Shell>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes)
|
||||||
|
{
|
||||||
|
views.Register(
|
||||||
|
new ViewMap(ViewModel: typeof(ShellViewModel)),
|
||||||
|
new ViewMap<MainPage, MainViewModel>(),
|
||||||
|
new DataViewMap<SecondPage, SecondViewModel, Entity>()
|
||||||
|
);
|
||||||
|
|
||||||
|
routes.Register(
|
||||||
|
new RouteMap("", View: views.FindByViewModel<ShellViewModel>(),
|
||||||
|
Nested:
|
||||||
|
[
|
||||||
|
new("Main", View: views.FindByViewModel<MainViewModel>(), IsDefault: true),
|
||||||
|
new("Second", View: views.FindByViewModel<SecondViewModel>()),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
42
Marechai.App/Assets/Icons/icon.svg
Normal file
42
Marechai.App/Assets/Icons/icon.svg
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="456"
|
||||||
|
height="456"
|
||||||
|
viewBox="0 0 456 456"
|
||||||
|
version="1.1"
|
||||||
|
id="svg453"
|
||||||
|
sodipodi:docname="icon.svg"
|
||||||
|
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs457" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview455"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="1.8574561"
|
||||||
|
inkscape:cx="228.26919"
|
||||||
|
inkscape:cy="228.26919"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1027"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg453" />
|
||||||
|
<rect
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="456"
|
||||||
|
height="456"
|
||||||
|
fill="#FFFFFF"
|
||||||
|
id="rect451" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
137
Marechai.App/Assets/Icons/icon_foreground.svg
Normal file
137
Marechai.App/Assets/Icons/icon_foreground.svg
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="450"
|
||||||
|
height="450"
|
||||||
|
viewBox="0 0 50.369617 49.826836"
|
||||||
|
version="1.1"
|
||||||
|
id="svg151"
|
||||||
|
sodipodi:docname="icon_foreground.svg"
|
||||||
|
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview153"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="1.250876"
|
||||||
|
inkscape:cx="218.64677"
|
||||||
|
inkscape:cy="175.87674"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1027"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="g149" />
|
||||||
|
<defs
|
||||||
|
id="defs105">
|
||||||
|
<path
|
||||||
|
id="aj28a0fd1a"
|
||||||
|
d="M 1.738,0.156 3.927,2.323 2.347,3.919 0.101,1.81 Z" />
|
||||||
|
<path
|
||||||
|
id="fdje57jgic"
|
||||||
|
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z" />
|
||||||
|
<path
|
||||||
|
id="6bg72xwlze"
|
||||||
|
d="M 2.398,0.044 3.994,1.624 1.886,3.869 0.232,2.232 Z" />
|
||||||
|
<path
|
||||||
|
id="eaqjnja8wg"
|
||||||
|
d="M 1.736,0.023 3.981,2.132 2.344,3.786 0.156,1.619 Z" />
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
fill="none"
|
||||||
|
fill-rule="evenodd"
|
||||||
|
id="g149"
|
||||||
|
transform="translate(-2.9304427e-4,-1.6465461e-4)">
|
||||||
|
<g
|
||||||
|
id="g147">
|
||||||
|
<g
|
||||||
|
id="g145">
|
||||||
|
<path
|
||||||
|
fill="#7a67f8"
|
||||||
|
d="M 34.758,38.865 H 34.746 C 31.892,38.86 29.342,36.882 26.152,33.692 l -6.93,-6.873 2.166,-2.188 6.937,6.88 c 3.075,3.074 4.876,4.272 6.427,4.275 h 0.005 c 1.567,0 3.467,-1.262 6.558,-4.353 l 3.541,-3.587 c 1.784,-1.784 2.57,-3.34 2.408,-4.762 -0.13,-1.156 -0.894,-2.397 -2.401,-3.904 L 44.83,19.146 C 43.202,17.414 41.211,15.483 39.131,14.414 38.745,12.437 37.48,10.881 37.3,10.596 c 3.803,0.559 7.197,3.703 9.758,6.424 2.788,2.794 5.803,7.176 -0.018,12.996 l -3.54,3.588 c -3.251,3.25 -5.844,5.261 -8.742,5.261"
|
||||||
|
id="path107" />
|
||||||
|
<path
|
||||||
|
fill="#f85977"
|
||||||
|
d="m 25.399,28.608 6.492,-6.562 c 3.076,-3.076 4.274,-4.877 4.276,-6.428 0.004,-1.567 -1.257,-3.469 -4.352,-6.563 L 28.228,5.515 C 24.58,1.867 22.369,2.699 19.561,5.507 L 19.528,5.54 c -1.54,1.448 -3.237,3.182 -4.346,5.01 -1.031,0.073 -2.361,0.424 -3.997,1.518 0.906,-3.397 3.737,-6.422 6.216,-8.755 2.794,-2.789 7.177,-5.804 12.997,0.017 l 3.588,3.54 c 3.255,3.256 5.266,5.851 5.26,8.754 -0.005,2.854 -1.982,5.404 -5.172,8.594 l -6.489,6.559 z"
|
||||||
|
id="path109" />
|
||||||
|
<path
|
||||||
|
fill="#159bff"
|
||||||
|
d="M 12.522,38.707 C 8.939,37.946 5.746,34.972 3.308,32.382 2.035,31.106 0.321,29.13 0.042,26.663 c -0.274,-2.414 0.8,-4.795 3.283,-7.278 l 3.542,-3.588 c 3.25,-3.25 5.843,-5.261 8.74,-5.261 h 0.013 c 2.854,0.005 5.404,1.983 8.593,5.172 l 7.046,6.976 -2.165,2.19 -7.053,-6.983 c -3.076,-3.076 -4.876,-4.273 -6.427,-4.276 h -0.006 c -1.566,0 -3.466,1.261 -6.557,4.352 L 5.51,21.555 c -1.784,1.784 -2.57,3.34 -2.409,4.762 0.131,1.156 0.894,2.396 2.402,3.904 l 0.033,0.034 c 1.55,1.649 3.43,3.479 5.401,4.573 0.168,1.739 1.2,3.297 1.585,3.88"
|
||||||
|
id="path111" />
|
||||||
|
<path
|
||||||
|
fill="#67e5ad"
|
||||||
|
d="m 26.32,49.827 c -1.925,0 -4.114,-0.886 -6.557,-3.33 l -3.588,-3.54 C 9.167,35.949 9.151,32.546 16.086,25.61 l 6.802,-6.872 2.193,2.162 -6.812,6.882 c -3.076,3.076 -4.273,4.877 -4.276,6.427 -0.003,1.568 1.258,3.47 4.352,6.563 l 3.588,3.541 c 3.646,3.647 5.858,2.816 8.666,0.008 l 0.034,-0.033 c 1.654,-1.555 3.5,-3.46 4.593,-5.437 1.661,-0.14 2.9,-0.841 3.835,-1.438 -0.8,3.537 -3.738,6.69 -6.302,9.102 -1.62,1.618 -3.777,3.312 -6.439,3.312"
|
||||||
|
id="path113" />
|
||||||
|
<g
|
||||||
|
transform="translate(21.154,18.577)"
|
||||||
|
id="g120">
|
||||||
|
<mask
|
||||||
|
id="8jptpqrneb"
|
||||||
|
fill="#ffffff">
|
||||||
|
<use
|
||||||
|
xlink:href="#aj28a0fd1a"
|
||||||
|
id="use115" />
|
||||||
|
</mask>
|
||||||
|
<path
|
||||||
|
d="M 0.101,1.81 1.738,0.156 3.927,2.323 2.347,3.919 Z"
|
||||||
|
mask="url(#8jptpqrneb)"
|
||||||
|
id="path118" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="translate(27.404,20.981)"
|
||||||
|
id="g127">
|
||||||
|
<mask
|
||||||
|
id="b2iljpfwbd"
|
||||||
|
fill="#ffffff">
|
||||||
|
<use
|
||||||
|
xlink:href="#fdje57jgic"
|
||||||
|
id="use122" />
|
||||||
|
</mask>
|
||||||
|
<path
|
||||||
|
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z"
|
||||||
|
mask="url(#b2iljpfwbd)"
|
||||||
|
id="path125" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="translate(18.99,24.587)"
|
||||||
|
id="g134">
|
||||||
|
<mask
|
||||||
|
id="gj70tyfpnf"
|
||||||
|
fill="#ffffff">
|
||||||
|
<use
|
||||||
|
xlink:href="#6bg72xwlze"
|
||||||
|
id="use129" />
|
||||||
|
</mask>
|
||||||
|
<path
|
||||||
|
d="M 1.886,3.869 0.232,2.232 2.398,0.044 3.994,1.624 Z"
|
||||||
|
mask="url(#gj70tyfpnf)"
|
||||||
|
id="path132" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="translate(25.24,26.99)"
|
||||||
|
id="g141">
|
||||||
|
<mask
|
||||||
|
id="z7vhvduckh"
|
||||||
|
fill="#ffffff">
|
||||||
|
<use
|
||||||
|
xlink:href="#eaqjnja8wg"
|
||||||
|
id="use136" />
|
||||||
|
</mask>
|
||||||
|
<path
|
||||||
|
d="M 3.981,2.132 2.344,3.786 0.156,1.619 1.736,0.023 Z"
|
||||||
|
mask="url(#z7vhvduckh)"
|
||||||
|
id="path139" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.5 KiB |
32
Marechai.App/Assets/SharedAssets.md
Normal file
32
Marechai.App/Assets/SharedAssets.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Shared Assets
|
||||||
|
|
||||||
|
See documentation about assets here: https://github.com/unoplatform/uno/blob/master/doc/articles/features/working-with-assets.md
|
||||||
|
|
||||||
|
## Here is a cheat sheet
|
||||||
|
|
||||||
|
1. Add the image file to the `Assets` directory of a shared project.
|
||||||
|
2. Set the build action to `Content`.
|
||||||
|
3. (Recommended) Provide an asset for various scales/dpi
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```text
|
||||||
|
\Assets\Images\logo.scale-100.png
|
||||||
|
\Assets\Images\logo.scale-200.png
|
||||||
|
\Assets\Images\logo.scale-400.png
|
||||||
|
|
||||||
|
\Assets\Images\scale-100\logo.png
|
||||||
|
\Assets\Images\scale-200\logo.png
|
||||||
|
\Assets\Images\scale-400\logo.png
|
||||||
|
```
|
||||||
|
|
||||||
|
### Table of scales
|
||||||
|
|
||||||
|
| Scale | WinUI | iOS | Android |
|
||||||
|
|-------|:-----------:|:---------------:|:-------:|
|
||||||
|
| `100` | scale-100 | @1x | mdpi |
|
||||||
|
| `125` | scale-125 | N/A | N/A |
|
||||||
|
| `150` | scale-150 | N/A | hdpi |
|
||||||
|
| `200` | scale-200 | @2x | xhdpi |
|
||||||
|
| `300` | scale-300 | @3x | xxhdpi |
|
||||||
|
| `400` | scale-400 | N/A | xxxhdpi |
|
||||||
137
Marechai.App/Assets/Splash/splash_screen.svg
Normal file
137
Marechai.App/Assets/Splash/splash_screen.svg
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="450"
|
||||||
|
height="450"
|
||||||
|
viewBox="0 0 50.369617 49.826836"
|
||||||
|
version="1.1"
|
||||||
|
id="svg151"
|
||||||
|
sodipodi:docname="icon_foreground.svg"
|
||||||
|
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview153"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="1.250876"
|
||||||
|
inkscape:cx="218.64677"
|
||||||
|
inkscape:cy="175.87674"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1027"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="g149" />
|
||||||
|
<defs
|
||||||
|
id="defs105">
|
||||||
|
<path
|
||||||
|
id="aj28a0fd1a"
|
||||||
|
d="M 1.738,0.156 3.927,2.323 2.347,3.919 0.101,1.81 Z" />
|
||||||
|
<path
|
||||||
|
id="fdje57jgic"
|
||||||
|
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z" />
|
||||||
|
<path
|
||||||
|
id="6bg72xwlze"
|
||||||
|
d="M 2.398,0.044 3.994,1.624 1.886,3.869 0.232,2.232 Z" />
|
||||||
|
<path
|
||||||
|
id="eaqjnja8wg"
|
||||||
|
d="M 1.736,0.023 3.981,2.132 2.344,3.786 0.156,1.619 Z" />
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
fill="none"
|
||||||
|
fill-rule="evenodd"
|
||||||
|
id="g149"
|
||||||
|
transform="translate(-2.9304427e-4,-1.6465461e-4)">
|
||||||
|
<g
|
||||||
|
id="g147">
|
||||||
|
<g
|
||||||
|
id="g145">
|
||||||
|
<path
|
||||||
|
fill="#7a67f8"
|
||||||
|
d="M 34.758,38.865 H 34.746 C 31.892,38.86 29.342,36.882 26.152,33.692 l -6.93,-6.873 2.166,-2.188 6.937,6.88 c 3.075,3.074 4.876,4.272 6.427,4.275 h 0.005 c 1.567,0 3.467,-1.262 6.558,-4.353 l 3.541,-3.587 c 1.784,-1.784 2.57,-3.34 2.408,-4.762 -0.13,-1.156 -0.894,-2.397 -2.401,-3.904 L 44.83,19.146 C 43.202,17.414 41.211,15.483 39.131,14.414 38.745,12.437 37.48,10.881 37.3,10.596 c 3.803,0.559 7.197,3.703 9.758,6.424 2.788,2.794 5.803,7.176 -0.018,12.996 l -3.54,3.588 c -3.251,3.25 -5.844,5.261 -8.742,5.261"
|
||||||
|
id="path107" />
|
||||||
|
<path
|
||||||
|
fill="#f85977"
|
||||||
|
d="m 25.399,28.608 6.492,-6.562 c 3.076,-3.076 4.274,-4.877 4.276,-6.428 0.004,-1.567 -1.257,-3.469 -4.352,-6.563 L 28.228,5.515 C 24.58,1.867 22.369,2.699 19.561,5.507 L 19.528,5.54 c -1.54,1.448 -3.237,3.182 -4.346,5.01 -1.031,0.073 -2.361,0.424 -3.997,1.518 0.906,-3.397 3.737,-6.422 6.216,-8.755 2.794,-2.789 7.177,-5.804 12.997,0.017 l 3.588,3.54 c 3.255,3.256 5.266,5.851 5.26,8.754 -0.005,2.854 -1.982,5.404 -5.172,8.594 l -6.489,6.559 z"
|
||||||
|
id="path109" />
|
||||||
|
<path
|
||||||
|
fill="#159bff"
|
||||||
|
d="M 12.522,38.707 C 8.939,37.946 5.746,34.972 3.308,32.382 2.035,31.106 0.321,29.13 0.042,26.663 c -0.274,-2.414 0.8,-4.795 3.283,-7.278 l 3.542,-3.588 c 3.25,-3.25 5.843,-5.261 8.74,-5.261 h 0.013 c 2.854,0.005 5.404,1.983 8.593,5.172 l 7.046,6.976 -2.165,2.19 -7.053,-6.983 c -3.076,-3.076 -4.876,-4.273 -6.427,-4.276 h -0.006 c -1.566,0 -3.466,1.261 -6.557,4.352 L 5.51,21.555 c -1.784,1.784 -2.57,3.34 -2.409,4.762 0.131,1.156 0.894,2.396 2.402,3.904 l 0.033,0.034 c 1.55,1.649 3.43,3.479 5.401,4.573 0.168,1.739 1.2,3.297 1.585,3.88"
|
||||||
|
id="path111" />
|
||||||
|
<path
|
||||||
|
fill="#67e5ad"
|
||||||
|
d="m 26.32,49.827 c -1.925,0 -4.114,-0.886 -6.557,-3.33 l -3.588,-3.54 C 9.167,35.949 9.151,32.546 16.086,25.61 l 6.802,-6.872 2.193,2.162 -6.812,6.882 c -3.076,3.076 -4.273,4.877 -4.276,6.427 -0.003,1.568 1.258,3.47 4.352,6.563 l 3.588,3.541 c 3.646,3.647 5.858,2.816 8.666,0.008 l 0.034,-0.033 c 1.654,-1.555 3.5,-3.46 4.593,-5.437 1.661,-0.14 2.9,-0.841 3.835,-1.438 -0.8,3.537 -3.738,6.69 -6.302,9.102 -1.62,1.618 -3.777,3.312 -6.439,3.312"
|
||||||
|
id="path113" />
|
||||||
|
<g
|
||||||
|
transform="translate(21.154,18.577)"
|
||||||
|
id="g120">
|
||||||
|
<mask
|
||||||
|
id="8jptpqrneb"
|
||||||
|
fill="#ffffff">
|
||||||
|
<use
|
||||||
|
xlink:href="#aj28a0fd1a"
|
||||||
|
id="use115" />
|
||||||
|
</mask>
|
||||||
|
<path
|
||||||
|
d="M 0.101,1.81 1.738,0.156 3.927,2.323 2.347,3.919 Z"
|
||||||
|
mask="url(#8jptpqrneb)"
|
||||||
|
id="path118" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="translate(27.404,20.981)"
|
||||||
|
id="g127">
|
||||||
|
<mask
|
||||||
|
id="b2iljpfwbd"
|
||||||
|
fill="#ffffff">
|
||||||
|
<use
|
||||||
|
xlink:href="#fdje57jgic"
|
||||||
|
id="use122" />
|
||||||
|
</mask>
|
||||||
|
<path
|
||||||
|
d="M 2.201,0.066 3.855,1.703 1.69,3.894 0.093,2.311 Z"
|
||||||
|
mask="url(#b2iljpfwbd)"
|
||||||
|
id="path125" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="translate(18.99,24.587)"
|
||||||
|
id="g134">
|
||||||
|
<mask
|
||||||
|
id="gj70tyfpnf"
|
||||||
|
fill="#ffffff">
|
||||||
|
<use
|
||||||
|
xlink:href="#6bg72xwlze"
|
||||||
|
id="use129" />
|
||||||
|
</mask>
|
||||||
|
<path
|
||||||
|
d="M 1.886,3.869 0.232,2.232 2.398,0.044 3.994,1.624 Z"
|
||||||
|
mask="url(#gj70tyfpnf)"
|
||||||
|
id="path132" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
transform="translate(25.24,26.99)"
|
||||||
|
id="g141">
|
||||||
|
<mask
|
||||||
|
id="z7vhvduckh"
|
||||||
|
fill="#ffffff">
|
||||||
|
<use
|
||||||
|
xlink:href="#eaqjnja8wg"
|
||||||
|
id="use136" />
|
||||||
|
</mask>
|
||||||
|
<path
|
||||||
|
d="M 3.981,2.132 2.344,3.786 0.156,1.619 1.736,0.023 Z"
|
||||||
|
mask="url(#z7vhvduckh)"
|
||||||
|
id="path139" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.5 KiB |
13
Marechai.App/GlobalUsings.cs
Normal file
13
Marechai.App/GlobalUsings.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
global using System.Collections.Immutable;
|
||||||
|
global using Microsoft.Extensions.DependencyInjection;
|
||||||
|
global using Microsoft.Extensions.Hosting;
|
||||||
|
global using Microsoft.Extensions.Localization;
|
||||||
|
global using Microsoft.Extensions.Logging;
|
||||||
|
global using Microsoft.Extensions.Options;
|
||||||
|
global using Marechai.App.Models;
|
||||||
|
global using Marechai.App.Presentation;
|
||||||
|
global using Marechai.App.Services.Endpoints;
|
||||||
|
global using Uno.Extensions.Http.Kiota;
|
||||||
|
global using ApplicationExecutionState = Windows.ApplicationModel.Activation.ApplicationExecutionState;
|
||||||
|
global using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
global using CommunityToolkit.Mvvm.Input;
|
||||||
42
Marechai.App/Marechai.App.csproj
Normal file
42
Marechai.App/Marechai.App.csproj
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<Project Sdk="Uno.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFrameworks>net10.0-android;net10.0-browserwasm;net10.0-desktop</TargetFrameworks>
|
||||||
|
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) Or $([MSBuild]::IsOSPlatform('macos'))">$(TargetFrameworks);net10.0-ios</TargetFrameworks>
|
||||||
|
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<UnoSingleProject>true</UnoSingleProject>
|
||||||
|
|
||||||
|
<!-- Display name -->
|
||||||
|
<ApplicationTitle>Marechai.App</ApplicationTitle>
|
||||||
|
<!-- App Identifier -->
|
||||||
|
<ApplicationId>net.marechai.app</ApplicationId>
|
||||||
|
<!-- Versions -->
|
||||||
|
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
||||||
|
<ApplicationVersion>1</ApplicationVersion>
|
||||||
|
<!-- Package Publisher -->
|
||||||
|
<ApplicationPublisher>O=Marechai.App</ApplicationPublisher>
|
||||||
|
<!-- Package Description -->
|
||||||
|
<Description>Marechai.App powered by Uno Platform.</Description>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
UnoFeatures let's you quickly add and manage implicit package references based on the features you want to use.
|
||||||
|
https://aka.platform.uno/singleproject-features
|
||||||
|
-->
|
||||||
|
<UnoFeatures>
|
||||||
|
Lottie;
|
||||||
|
Hosting;
|
||||||
|
Toolkit;
|
||||||
|
Logging;
|
||||||
|
LoggingSerilog;
|
||||||
|
Mvvm;
|
||||||
|
Configuration;
|
||||||
|
HttpKiota;
|
||||||
|
Serialization;
|
||||||
|
Localization;
|
||||||
|
Navigation;
|
||||||
|
ThemeService;
|
||||||
|
SkiaRenderer;
|
||||||
|
</UnoFeatures>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
6
Marechai.App/Models/AppConfig.cs
Normal file
6
Marechai.App/Models/AppConfig.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Marechai.App.Models;
|
||||||
|
|
||||||
|
public record AppConfig
|
||||||
|
{
|
||||||
|
public string? Environment { get; init; }
|
||||||
|
}
|
||||||
3
Marechai.App/Models/Entity.cs
Normal file
3
Marechai.App/Models/Entity.cs
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
namespace Marechai.App.Models;
|
||||||
|
|
||||||
|
public record Entity(string Name);
|
||||||
31
Marechai.App/Package.appxmanifest
Normal file
31
Marechai.App/Package.appxmanifest
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Package
|
||||||
|
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||||
|
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||||
|
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||||
|
IgnorableNamespaces="uap rescap">
|
||||||
|
|
||||||
|
<Identity />
|
||||||
|
<Properties />
|
||||||
|
|
||||||
|
<Dependencies>
|
||||||
|
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||||
|
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||||
|
</Dependencies>
|
||||||
|
|
||||||
|
<Resources>
|
||||||
|
<Resource Language="x-generate"/>
|
||||||
|
</Resources>
|
||||||
|
|
||||||
|
<Applications>
|
||||||
|
<Application Id="App"
|
||||||
|
Executable="$targetnametoken$.exe"
|
||||||
|
EntryPoint="$targetentrypoint$">
|
||||||
|
<uap:VisualElements />
|
||||||
|
</Application>
|
||||||
|
</Applications>
|
||||||
|
|
||||||
|
<Capabilities>
|
||||||
|
<rescap:Capability Name="runFullTrust" />
|
||||||
|
</Capabilities>
|
||||||
|
</Package>
|
||||||
4
Marechai.App/Platforms/Android/AndroidManifest.xml
Normal file
4
Marechai.App/Platforms/Android/AndroidManifest.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<application android:allowBackup="true" android:supportsRtl="true"></application>
|
||||||
|
</manifest>
|
||||||
22
Marechai.App/Platforms/Android/Assets/AboutAssets.txt
Normal file
22
Marechai.App/Platforms/Android/Assets/AboutAssets.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
To add cross-platform image assets for your Uno Platform app, use the Assets folder
|
||||||
|
in the shared project instead. Assets in this folder are Android-only assets.
|
||||||
|
|
||||||
|
Any raw assets you want to be deployed with your application can be placed in
|
||||||
|
this directory (and child directories) and given a Build Action of "AndroidAsset".
|
||||||
|
|
||||||
|
These files will be deployed with your package and will be accessible using Android's
|
||||||
|
AssetManager, like this:
|
||||||
|
|
||||||
|
public class ReadAsset : Activity
|
||||||
|
{
|
||||||
|
protected override void OnCreate (Bundle bundle)
|
||||||
|
{
|
||||||
|
base.OnCreate (bundle);
|
||||||
|
|
||||||
|
InputStream input = Assets.Open ("my_asset.txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Additionally, some Android functions will automatically load asset files:
|
||||||
|
|
||||||
|
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
|
||||||
28
Marechai.App/Platforms/Android/Main.Android.cs
Normal file
28
Marechai.App/Platforms/Android/Main.Android.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Android.App;
|
||||||
|
using Android.Content;
|
||||||
|
using Android.OS;
|
||||||
|
using Android.Runtime;
|
||||||
|
using Android.Views;
|
||||||
|
using Android.Widget;
|
||||||
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
|
||||||
|
namespace Marechai.App.Droid;
|
||||||
|
|
||||||
|
[global::Android.App.ApplicationAttribute(
|
||||||
|
Label = "@string/ApplicationName",
|
||||||
|
Icon = "@mipmap/icon",
|
||||||
|
LargeHeap = true,
|
||||||
|
HardwareAccelerated = true,
|
||||||
|
Theme = "@style/Theme.App.Starting"
|
||||||
|
)]
|
||||||
|
public class Application : Microsoft.UI.Xaml.NativeApplication
|
||||||
|
{
|
||||||
|
public Application(IntPtr javaReference, JniHandleOwnership transfer)
|
||||||
|
: base(() => new App(), javaReference, transfer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
22
Marechai.App/Platforms/Android/MainActivity.Android.cs
Normal file
22
Marechai.App/Platforms/Android/MainActivity.Android.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using Android.App;
|
||||||
|
using Android.Content.PM;
|
||||||
|
using Android.OS;
|
||||||
|
using Android.Views;
|
||||||
|
using Android.Widget;
|
||||||
|
|
||||||
|
namespace Marechai.App.Droid;
|
||||||
|
|
||||||
|
[Activity(
|
||||||
|
MainLauncher = true,
|
||||||
|
ConfigurationChanges = global::Uno.UI.ActivityHelper.AllConfigChanges,
|
||||||
|
WindowSoftInputMode = SoftInput.AdjustNothing | SoftInput.StateHidden
|
||||||
|
)]
|
||||||
|
public class MainActivity : Microsoft.UI.Xaml.ApplicationActivity
|
||||||
|
{
|
||||||
|
protected override void OnCreate(Bundle? savedInstanceState)
|
||||||
|
{
|
||||||
|
global::AndroidX.Core.SplashScreen.SplashScreen.InstallSplashScreen(this);
|
||||||
|
|
||||||
|
base.OnCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
}
|
||||||
47
Marechai.App/Platforms/Android/Resources/AboutResources.txt
Normal file
47
Marechai.App/Platforms/Android/Resources/AboutResources.txt
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
To add cross-platform image assets for your Uno Platform app, use the Assets folder
|
||||||
|
in the shared project instead. Resources in this folder are Android-only.
|
||||||
|
|
||||||
|
Images, layout descriptions, binary blobs and string dictionaries can be included
|
||||||
|
in your application as resource files. Various Android APIs are designed to
|
||||||
|
operate on the resource IDs instead of dealing with images, strings or binary blobs
|
||||||
|
directly.
|
||||||
|
|
||||||
|
For example, a sample Android app that contains a user interface layout (main.axml),
|
||||||
|
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
|
||||||
|
would keep its resources in the "Resources" directory of the application:
|
||||||
|
|
||||||
|
Resources/
|
||||||
|
drawable/
|
||||||
|
icon.png
|
||||||
|
|
||||||
|
layout/
|
||||||
|
main.axml
|
||||||
|
|
||||||
|
values/
|
||||||
|
strings.xml
|
||||||
|
|
||||||
|
In order to get the build system to recognize Android resources, set the build action to
|
||||||
|
"AndroidResource". The native Android APIs do not operate directly with filenames, but
|
||||||
|
instead operate on resource IDs. When you compile an Android application that uses resources,
|
||||||
|
the build system will package the resources for distribution and generate a class called "R"
|
||||||
|
(this is an Android convention) that contains the tokens for each one of the resources
|
||||||
|
included. For example, for the above Resources layout, this is what the R class would expose:
|
||||||
|
|
||||||
|
public class R {
|
||||||
|
public class drawable {
|
||||||
|
public const int icon = 0x123;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class layout {
|
||||||
|
public const int main = 0x456;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class strings {
|
||||||
|
public const int first_string = 0xabc;
|
||||||
|
public const int second_string = 0xbcd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
|
||||||
|
to reference the layout/main.axml file, or R.strings.first_string to reference the first
|
||||||
|
string in the dictionary file values/strings.xml.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="Hello">Hello World, Click Me!</string>
|
||||||
|
<string name="ApplicationName">Marechai.App</string>
|
||||||
|
</resources>
|
||||||
25
Marechai.App/Platforms/Android/Resources/values/Styles.xml
Normal file
25
Marechai.App/Platforms/Android/Resources/values/Styles.xml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<resources>
|
||||||
|
<style name="AppTheme" parent="Theme.MaterialComponents.Light">
|
||||||
|
<!-- This removes the ActionBar -->
|
||||||
|
<item name="windowActionBar">false</item>
|
||||||
|
<item name="android:windowActionBar">false</item>
|
||||||
|
<item name="windowNoTitle">true</item>
|
||||||
|
<item name="android:windowNoTitle">true</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
|
||||||
|
<!-- uno_splash_color and uno_splash_image are generated by Uno.Resizetizer -->
|
||||||
|
<!-- This property is used for the splash screen -->
|
||||||
|
<item name="android:windowSplashScreenBackground">@color/uno_splash_color</item>
|
||||||
|
<item name="android:windowBackground">@drawable/uno_splash_image</item>
|
||||||
|
<item name="android:windowSplashScreenAnimatedIcon">@drawable/uno_splash_image</item>
|
||||||
|
|
||||||
|
<item name="postSplashScreenTheme">@style/AppTheme</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.AppCompat.Translucent">
|
||||||
|
<item name="android:windowIsTranslucent">true</item>
|
||||||
|
<item name="android:windowAnimationStyle">@android:style/Animation</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
2
Marechai.App/Platforms/Android/environment.conf
Normal file
2
Marechai.App/Platforms/Android/environment.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# See this for more details: http://developer.xamarin.com/guides/android/advanced_topics/garbage_collection/
|
||||||
|
MONO_GC_PARAMS=bridge-implementation=new,nursery-size=32m,soft-heap-limit=256m
|
||||||
21
Marechai.App/Platforms/Desktop/Program.cs
Normal file
21
Marechai.App/Platforms/Desktop/Program.cs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using Uno.UI.Hosting;
|
||||||
|
|
||||||
|
namespace Marechai.App;
|
||||||
|
|
||||||
|
internal class Program
|
||||||
|
{
|
||||||
|
[STAThread]
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
var host = UnoPlatformHostBuilder.Create()
|
||||||
|
.App(() => new App())
|
||||||
|
.UseX11()
|
||||||
|
.UseLinuxFrameBuffer()
|
||||||
|
.UseMacOS()
|
||||||
|
.UseWin32()
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
host.Run();
|
||||||
|
}
|
||||||
|
}
|
||||||
10
Marechai.App/Platforms/WebAssembly/LinkerConfig.xml
Normal file
10
Marechai.App/Platforms/WebAssembly/LinkerConfig.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<linker>
|
||||||
|
<assembly fullname="Marechai.App" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Uncomment this section when using JSON.NET
|
||||||
|
<assembly fullname="System.Core">
|
||||||
|
<type fullname="System.Linq.Expressions*" />
|
||||||
|
</assembly>
|
||||||
|
-->
|
||||||
|
</linker>
|
||||||
17
Marechai.App/Platforms/WebAssembly/Program.cs
Normal file
17
Marechai.App/Platforms/WebAssembly/Program.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using Uno.UI.Hosting;
|
||||||
|
|
||||||
|
namespace Marechai.App;
|
||||||
|
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static async Task Main(string[] args)
|
||||||
|
{
|
||||||
|
var host = UnoPlatformHostBuilder.Create()
|
||||||
|
.App(() => new App())
|
||||||
|
.UseWebAssembly()
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
await host.RunAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
28
Marechai.App/Platforms/WebAssembly/WasmCSS/Fonts.css
Normal file
28
Marechai.App/Platforms/WebAssembly/WasmCSS/Fonts.css
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/**
|
||||||
|
When adding fonts here, make sure to add them using a base64 data uri, otherwise
|
||||||
|
fonts loading are delayed, and text may get displayed incorrectly.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* https://github.com/unoplatform/uno/issues/3954 */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Segoe UI';
|
||||||
|
src: local('Segoe UI'), local('-apple-system'), local('BlinkMacSystemFont'), local('Inter'), local('Cantarell'), local('Ubuntu'), local('Roboto'), local('Open Sans'), local('Noto Sans'), local('Helvetica Neue'), local('sans-serif');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Roboto';
|
||||||
|
src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Light.ttf) format('truetype');
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Roboto';
|
||||||
|
src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Regular.ttf) format('truetype');
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Roboto';
|
||||||
|
src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Medium.ttf) format('truetype');
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
var UnoAppManifest = {
|
||||||
|
displayName: "Marechai.App"
|
||||||
|
}
|
||||||
10
Marechai.App/Platforms/WebAssembly/manifest.webmanifest
Normal file
10
Marechai.App/Platforms/WebAssembly/manifest.webmanifest
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
"description": "Marechai.App",
|
||||||
|
"display": "standalone",
|
||||||
|
"name": "Marechai.App",
|
||||||
|
"short_name": "Marechai.App",
|
||||||
|
"start_url": "/index.html",
|
||||||
|
"theme_color": "#ffffff",
|
||||||
|
"scope": "/"
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"navigationFallback": {
|
||||||
|
"rewrite": "/index.html",
|
||||||
|
"exclude": [
|
||||||
|
"*.{css,js}",
|
||||||
|
"*.{png}",
|
||||||
|
"*.{c,h,wasm,clr,pdb,dat,txt}"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"route": "/package_*",
|
||||||
|
"headers": {
|
||||||
|
"cache-control": "public, immutable, max-age=31536000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/*.ttf",
|
||||||
|
"headers": {
|
||||||
|
"cache-control": "public, immutable, max-age=31536000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/*",
|
||||||
|
"headers": {
|
||||||
|
"cache-control": "must-revalidate, max-age=3600"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
78
Marechai.App/Platforms/WebAssembly/wwwroot/web.config
Normal file
78
Marechai.App/Platforms/WebAssembly/wwwroot/web.config
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.web>
|
||||||
|
<customErrors mode="Off"/>
|
||||||
|
</system.web>
|
||||||
|
|
||||||
|
<system.webServer>
|
||||||
|
|
||||||
|
<!-- Disable compression as we're doing it through pre-compressed files -->
|
||||||
|
<urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" />
|
||||||
|
|
||||||
|
<staticContent>
|
||||||
|
<remove fileExtension=".dll" />
|
||||||
|
<remove fileExtension=".wasm" />
|
||||||
|
<remove fileExtension=".woff" />
|
||||||
|
<remove fileExtension=".woff2" />
|
||||||
|
<mimeMap fileExtension=".wasm" mimeType="application/wasm" />
|
||||||
|
<mimeMap fileExtension=".clr" mimeType="application/octet-stream" />
|
||||||
|
<mimeMap fileExtension=".pdb" mimeType="application/octet-stream" />
|
||||||
|
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
|
||||||
|
<mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
|
||||||
|
<mimeMap fileExtension=".dat" mimeType="application/octet-stream" />
|
||||||
|
<!-- Required for PWAs -->
|
||||||
|
<mimeMap fileExtension=".json" mimeType="application/octet-stream" />
|
||||||
|
</staticContent>
|
||||||
|
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<rule name="Lookup for pre-compressed brotli file" stopProcessing="true">
|
||||||
|
<match url="(.*)$"/>
|
||||||
|
<conditions>
|
||||||
|
<!-- Match brotli requests -->
|
||||||
|
<add input="{HTTP_ACCEPT_ENCODING}" pattern="br" />
|
||||||
|
|
||||||
|
<!-- Match all but pre-compressed files -->
|
||||||
|
<add input="{REQUEST_URI}" pattern="^(?!/_compressed_br/)(.*)$" />
|
||||||
|
|
||||||
|
<!-- Check if the pre-compressed file exists on the disk -->
|
||||||
|
<add input="{DOCUMENT_ROOT}/_compressed_br/{C:0}" matchType="IsFile" negate="false" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="/_compressed_br{C:0}" />
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<rule name="Lookup for pre-compressed gzip file" stopProcessing="true">
|
||||||
|
<match url="(.*)$"/>
|
||||||
|
<conditions>
|
||||||
|
<!-- Match gzip requests -->
|
||||||
|
<add input="{HTTP_ACCEPT_ENCODING}" pattern="gzip" />
|
||||||
|
|
||||||
|
<!-- Match all but pre-compressed files -->
|
||||||
|
<add input="{REQUEST_URI}" pattern="^(?!/_compressed_gz/)(.*)$" />
|
||||||
|
|
||||||
|
<!-- Check if the pre-compressed file exists on the disk -->
|
||||||
|
<add input="{DOCUMENT_ROOT}/_compressed_gz/{C:0}" matchType="IsFile" negate="false" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="/_compressed_gz{C:0}" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
|
||||||
|
<outboundRules>
|
||||||
|
<rule name="Adjust content encoding for gzip pre-compressed files" enabled="true" stopProcessing="true">
|
||||||
|
<match serverVariable="RESPONSE_CONTENT_ENCODING" pattern="" />
|
||||||
|
<conditions>
|
||||||
|
<add input="{REQUEST_URI}" pattern="/_compressed_gz/.*$" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" value="gzip"/>
|
||||||
|
</rule>
|
||||||
|
<rule name="Adjust content encoding for brotli pre-compressed files" enabled="true" stopProcessing="true">
|
||||||
|
<match serverVariable="RESPONSE_CONTENT_ENCODING" pattern="" />
|
||||||
|
<conditions>
|
||||||
|
<add input="{REQUEST_URI}" pattern="/_compressed_br/.*$" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" value="br"/>
|
||||||
|
</rule>
|
||||||
|
</outboundRules>
|
||||||
|
</rewrite>
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
6
Marechai.App/Platforms/iOS/Entitlements.plist
Normal file
6
Marechai.App/Platforms/iOS/Entitlements.plist
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
43
Marechai.App/Platforms/iOS/Info.plist
Normal file
43
Marechai.App/Platforms/iOS/Info.plist
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIDeviceFamily</key>
|
||||||
|
<array>
|
||||||
|
<integer>1</integer>
|
||||||
|
<integer>2</integer>
|
||||||
|
</array>
|
||||||
|
<key>UIRequiredDeviceCapabilities</key>
|
||||||
|
<array>
|
||||||
|
<string>armv7</string>
|
||||||
|
<string>arm64</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
|
<false/>
|
||||||
|
<key>XSAppIconAssets</key>
|
||||||
|
<string>Assets.xcassets/icon.appiconset</string>
|
||||||
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
|
<true/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Adjust this to your application's encryption usage.
|
||||||
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
|
<false/>
|
||||||
|
-->
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
18
Marechai.App/Platforms/iOS/Main.iOS.cs
Normal file
18
Marechai.App/Platforms/iOS/Main.iOS.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using UIKit;
|
||||||
|
using Uno.UI.Hosting;
|
||||||
|
|
||||||
|
namespace Marechai.App.iOS;
|
||||||
|
|
||||||
|
public class EntryPoint
|
||||||
|
{
|
||||||
|
// This is the main entry point of the application.
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
var host = UnoPlatformHostBuilder.Create()
|
||||||
|
.App(() => new App())
|
||||||
|
.UseAppleUIKit()
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
host.Run();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"images": [
|
||||||
|
{
|
||||||
|
"orientation": "portrait",
|
||||||
|
"extent": "full-screen",
|
||||||
|
"minimum-system-version": "7.0",
|
||||||
|
"scale": "2x",
|
||||||
|
"size": "640x960",
|
||||||
|
"idiom": "iphone"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation": "portrait",
|
||||||
|
"extent": "full-screen",
|
||||||
|
"minimum-system-version": "7.0",
|
||||||
|
"subtype": "retina4",
|
||||||
|
"scale": "2x",
|
||||||
|
"size": "640x1136",
|
||||||
|
"idiom": "iphone"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation": "portrait",
|
||||||
|
"extent": "full-screen",
|
||||||
|
"minimum-system-version": "7.0",
|
||||||
|
"scale": "1x",
|
||||||
|
"size": "768x1024",
|
||||||
|
"idiom": "ipad"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation": "landscape",
|
||||||
|
"extent": "full-screen",
|
||||||
|
"minimum-system-version": "7.0",
|
||||||
|
"scale": "1x",
|
||||||
|
"size": "1024x768",
|
||||||
|
"idiom": "ipad"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation": "portrait",
|
||||||
|
"extent": "full-screen",
|
||||||
|
"minimum-system-version": "7.0",
|
||||||
|
"scale": "2x",
|
||||||
|
"size": "1536x2048",
|
||||||
|
"idiom": "ipad"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation": "landscape",
|
||||||
|
"extent": "full-screen",
|
||||||
|
"minimum-system-version": "7.0",
|
||||||
|
"scale": "2x",
|
||||||
|
"size": "2048x1536",
|
||||||
|
"idiom": "ipad"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"properties": {},
|
||||||
|
"info": {
|
||||||
|
"version": 1,
|
||||||
|
"author": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
41
Marechai.App/Platforms/iOS/PrivacyInfo.xcprivacy
Normal file
41
Marechai.App/Platforms/iOS/PrivacyInfo.xcprivacy
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<!-- see https://aka.platform/uno/apple-privacy-manifest for more information -->
|
||||||
|
|
||||||
|
<!-- .NET Runtime/BCL -->
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
|
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
||||||
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
|
<array>
|
||||||
|
<string>C617.1</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
|
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
|
||||||
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
|
<array>
|
||||||
|
<string>35F9.1</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
|
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
|
||||||
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
|
<array>
|
||||||
|
<string>E174.1</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
|
||||||
|
<!-- NSUserDefaults -->
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
|
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||||
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
|
<array>
|
||||||
|
<string>CA92.1</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
29
Marechai.App/Presentation/MainPage.xaml
Normal file
29
Marechai.App/Presentation/MainPage.xaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<Page x:Class="Marechai.App.Presentation.MainPage"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="using:Marechai.App.Presentation"
|
||||||
|
xmlns:uen="using:Uno.Extensions.Navigation.UI"
|
||||||
|
xmlns:utu="using:Uno.Toolkit.UI"
|
||||||
|
NavigationCacheMode="Required"
|
||||||
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
|
<ScrollViewer IsTabStop="True">
|
||||||
|
<Grid utu:SafeArea.Insets="VisibleBounds">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<utu:NavigationBar Content="{Binding Title}" />
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="1"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Spacing="16">
|
||||||
|
<TextBox Text="{Binding Name, Mode=TwoWay}"
|
||||||
|
PlaceholderText="Enter your name:" />
|
||||||
|
<Button Content="Go to Second Page"
|
||||||
|
AutomationProperties.AutomationId="SecondPageButton"
|
||||||
|
Command="{Binding GoToSecond}" />
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Page>
|
||||||
11
Marechai.App/Presentation/MainPage.xaml.cs
Normal file
11
Marechai.App/Presentation/MainPage.xaml.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using Microsoft.UI.Xaml.Controls;
|
||||||
|
|
||||||
|
namespace Marechai.App.Presentation;
|
||||||
|
|
||||||
|
public sealed partial class MainPage : Page
|
||||||
|
{
|
||||||
|
public MainPage()
|
||||||
|
{
|
||||||
|
this.InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
33
Marechai.App/Presentation/MainViewModel.cs
Normal file
33
Marechai.App/Presentation/MainViewModel.cs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using Uno.Extensions.Navigation;
|
||||||
|
|
||||||
|
namespace Marechai.App.Presentation;
|
||||||
|
|
||||||
|
public partial class MainViewModel : ObservableObject
|
||||||
|
{
|
||||||
|
private INavigator _navigator;
|
||||||
|
|
||||||
|
[ObservableProperty] private string? name;
|
||||||
|
|
||||||
|
public MainViewModel(
|
||||||
|
IStringLocalizer localizer,
|
||||||
|
IOptions<AppConfig> appInfo,
|
||||||
|
INavigator navigator)
|
||||||
|
{
|
||||||
|
_navigator = navigator;
|
||||||
|
Title = "Main";
|
||||||
|
Title += $" - {localizer["ApplicationName"]}";
|
||||||
|
Title += $" - {appInfo?.Value?.Environment}";
|
||||||
|
GoToSecond = new AsyncRelayCommand(GoToSecondView);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? Title { get; }
|
||||||
|
|
||||||
|
public ICommand GoToSecond { get; }
|
||||||
|
|
||||||
|
private async Task GoToSecondView()
|
||||||
|
{
|
||||||
|
await _navigator.NavigateViewModelAsync<SecondViewModel>(this, data: new Entity(Name!));
|
||||||
|
}
|
||||||
|
}
|
||||||
27
Marechai.App/Presentation/SecondPage.xaml
Normal file
27
Marechai.App/Presentation/SecondPage.xaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<Page x:Class="Marechai.App.Presentation.SecondPage"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="using:Marechai.App.Presentation"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:uen="using:Uno.Extensions.Navigation.UI"
|
||||||
|
xmlns:utu="using:Uno.Toolkit.UI"
|
||||||
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
|
|
||||||
|
<Grid utu:SafeArea.Insets="VisibleBounds">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<utu:NavigationBar Content="Second Page" />
|
||||||
|
<StackPanel Grid.Row="1"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
<TextBlock Text="{Binding Entity.Name}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="8" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Page>
|
||||||
11
Marechai.App/Presentation/SecondPage.xaml.cs
Normal file
11
Marechai.App/Presentation/SecondPage.xaml.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using Microsoft.UI.Xaml.Controls;
|
||||||
|
|
||||||
|
namespace Marechai.App.Presentation;
|
||||||
|
|
||||||
|
public sealed partial class SecondPage : Page
|
||||||
|
{
|
||||||
|
public SecondPage()
|
||||||
|
{
|
||||||
|
this.InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
5
Marechai.App/Presentation/SecondViewModel.cs
Normal file
5
Marechai.App/Presentation/SecondViewModel.cs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
namespace Marechai.App.Presentation;
|
||||||
|
|
||||||
|
public partial record SecondViewModel(Entity Entity)
|
||||||
|
{
|
||||||
|
}
|
||||||
36
Marechai.App/Presentation/Shell.xaml
Normal file
36
Marechai.App/Presentation/Shell.xaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<UserControl x:Class="Marechai.App.Presentation.Shell"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="using:Marechai.App.Presentation"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:utu="using:Uno.Toolkit.UI"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="300"
|
||||||
|
d:DesignWidth="400">
|
||||||
|
<Border Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
|
<utu:ExtendedSplashScreen x:Name="Splash"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
HorizontalContentAlignment="Stretch"
|
||||||
|
VerticalContentAlignment="Stretch">
|
||||||
|
<utu:ExtendedSplashScreen.LoadingContentTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="2*" />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ProgressRing IsActive="True"
|
||||||
|
Grid.Row="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Height="100"
|
||||||
|
Width="100" />
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</utu:ExtendedSplashScreen.LoadingContentTemplate>
|
||||||
|
</utu:ExtendedSplashScreen>
|
||||||
|
</Border>
|
||||||
|
</UserControl>
|
||||||
14
Marechai.App/Presentation/Shell.xaml.cs
Normal file
14
Marechai.App/Presentation/Shell.xaml.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using Microsoft.UI.Xaml.Controls;
|
||||||
|
using Uno.Extensions.Hosting;
|
||||||
|
|
||||||
|
namespace Marechai.App.Presentation;
|
||||||
|
|
||||||
|
public sealed partial class Shell : UserControl, IContentControlProvider
|
||||||
|
{
|
||||||
|
public Shell()
|
||||||
|
{
|
||||||
|
this.InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContentControl ContentControl => Splash;
|
||||||
|
}
|
||||||
15
Marechai.App/Presentation/ShellViewModel.cs
Normal file
15
Marechai.App/Presentation/ShellViewModel.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
using Uno.Extensions.Navigation;
|
||||||
|
|
||||||
|
namespace Marechai.App.Presentation;
|
||||||
|
|
||||||
|
public class ShellViewModel
|
||||||
|
{
|
||||||
|
private readonly INavigator _navigator;
|
||||||
|
|
||||||
|
public ShellViewModel(
|
||||||
|
INavigator navigator)
|
||||||
|
{
|
||||||
|
_navigator = navigator;
|
||||||
|
// Add code here to initialize or attach event handlers to singleton services
|
||||||
|
}
|
||||||
|
}
|
||||||
50
Marechai.App/Services/Endpoints/DebugHandler.cs
Normal file
50
Marechai.App/Services/Endpoints/DebugHandler.cs
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Uno.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace Marechai.App.Services.Endpoints;
|
||||||
|
|
||||||
|
internal class DebugHttpHandler : DelegatingHandler
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
|
public DebugHttpHandler(ILogger<DebugHttpHandler> logger, HttpMessageHandler? innerHandler = null)
|
||||||
|
: base(innerHandler ?? new HttpClientHandler())
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async override Task<HttpResponseMessage> SendAsync(
|
||||||
|
HttpRequestMessage request,
|
||||||
|
CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var response = await base.SendAsync(request, cancellationToken);
|
||||||
|
#if DEBUG
|
||||||
|
if (!response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
_logger.LogDebugMessage("Unsuccessful API Call");
|
||||||
|
if (request.RequestUri is not null)
|
||||||
|
{
|
||||||
|
_logger.LogDebugMessage($"{request.RequestUri} ({request.Method})");
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ((var key, var values) in request.Headers.ToDictionary(x => x.Key, x => string.Join(", ", x.Value)))
|
||||||
|
{
|
||||||
|
_logger.LogDebugMessage($"{key}: {values}");
|
||||||
|
}
|
||||||
|
|
||||||
|
var content = request.Content is not null ? await request.Content.ReadAsStringAsync() : null;
|
||||||
|
if (!string.IsNullOrEmpty(content))
|
||||||
|
{
|
||||||
|
_logger.LogDebugMessage(content);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Uncomment to automatically break when an API call fails while debugging
|
||||||
|
// System.Diagnostics.Debugger.Break();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
123
Marechai.App/Strings/en/Resources.resw
Normal file
123
Marechai.App/Strings/en/Resources.resw
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="ApplicationName" xml:space="preserve">
|
||||||
|
<value>Marechai.App-en</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
123
Marechai.App/Strings/es/Resources.resw
Normal file
123
Marechai.App/Strings/es/Resources.resw
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="ApplicationName" xml:space="preserve">
|
||||||
|
<value>Marechai.App-es</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
123
Marechai.App/Strings/fr/Resources.resw
Normal file
123
Marechai.App/Strings/fr/Resources.resw
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="ApplicationName" xml:space="preserve">
|
||||||
|
<value>Marechai.App-fr</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
123
Marechai.App/Strings/pt-BR/Resources.resw
Normal file
123
Marechai.App/Strings/pt-BR/Resources.resw
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="ApplicationName" xml:space="preserve">
|
||||||
|
<value>Marechai.App-pt-BR</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
25
Marechai.App/app.manifest
Normal file
25
Marechai.App/app.manifest
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="Marechai.App.Windows.app"/>
|
||||||
|
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!--The ID below informs the system that this application is compatible with OS features first introduced in Windows 8.
|
||||||
|
For more info see https://docs.microsoft.com/windows/win32/sysinfo/targeting-your-application-at-windows-8-1
|
||||||
|
|
||||||
|
It is also necessary to support features in unpackaged applications, for example the custom titlebar implementation.-->
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings>
|
||||||
|
<!-- The combination of below two tags have the following effect:
|
||||||
|
1) Per-Monitor for >= Windows 10 Anniversary Update
|
||||||
|
2) System < Windows 10 Anniversary Update
|
||||||
|
-->
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
|
||||||
|
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
||||||
9
Marechai.App/appsettings.development.json
Normal file
9
Marechai.App/appsettings.development.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"AppConfig": {
|
||||||
|
"Environment": "Development"
|
||||||
|
},
|
||||||
|
"ApiClient": {
|
||||||
|
"Url": "https://localhost:5002",
|
||||||
|
"UseNativeHandler": true
|
||||||
|
}
|
||||||
|
}
|
||||||
16
Marechai.App/appsettings.json
Normal file
16
Marechai.App/appsettings.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"AppConfig": {
|
||||||
|
"Environment": "Production"
|
||||||
|
},
|
||||||
|
"ApiClient": {
|
||||||
|
"UseNativeHandler": true
|
||||||
|
},
|
||||||
|
"LocalizationConfiguration": {
|
||||||
|
"Cultures": [
|
||||||
|
"es",
|
||||||
|
"fr",
|
||||||
|
"pt-BR",
|
||||||
|
"en"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,13 +20,17 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class BaseDto<TKey>
|
||||||
{
|
{
|
||||||
public class BaseViewModel<TKey>
|
[JsonPropertyName("id")]
|
||||||
{
|
[Required]
|
||||||
public TKey Id;
|
public TKey Id { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
107
Marechai.Data/Dtos/BasePhotoDto.cs
Normal file
107
Marechai.Data/Dtos/BasePhotoDto.cs
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using Marechai.Database;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class BasePhotoDto : BaseDto<Guid>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("aperture")]
|
||||||
|
public double? Aperture { get; set; }
|
||||||
|
[JsonPropertyName("author")]
|
||||||
|
public string? Author { get; set; }
|
||||||
|
[JsonPropertyName("camera_manufacturer")]
|
||||||
|
public string? CameraManufacturer { get; set; }
|
||||||
|
[JsonPropertyName("camera_model")]
|
||||||
|
public string? CameraModel { get; set; }
|
||||||
|
[JsonPropertyName("colorspace")]
|
||||||
|
public ColorSpace? ColorSpace { get; set; }
|
||||||
|
[JsonPropertyName("comments")]
|
||||||
|
public string? Comments { get; set; }
|
||||||
|
[JsonPropertyName("contrast")]
|
||||||
|
public Contrast? Contrast { get; set; }
|
||||||
|
[JsonPropertyName("creation_date")]
|
||||||
|
public DateTime? CreationDate { get; set; }
|
||||||
|
[JsonPropertyName("digital_zoom")]
|
||||||
|
public double? DigitalZoomRatio { get; set; }
|
||||||
|
[JsonPropertyName("exif_version")]
|
||||||
|
public string? ExifVersion { get; set; }
|
||||||
|
[JsonPropertyName("exposure")]
|
||||||
|
public double? ExposureTime { get; set; }
|
||||||
|
[JsonPropertyName("exposure_method")]
|
||||||
|
public ExposureMode? ExposureMethod { get; set; }
|
||||||
|
[JsonPropertyName("exposure_program")]
|
||||||
|
public ExposureProgram? ExposureProgram { get; set; }
|
||||||
|
[JsonPropertyName("flash")]
|
||||||
|
public Flash? Flash { get; set; }
|
||||||
|
[JsonPropertyName("focal")]
|
||||||
|
public double? Focal { get; set; }
|
||||||
|
[JsonPropertyName("focal_length")]
|
||||||
|
public double? FocalLength { get; set; }
|
||||||
|
[JsonPropertyName("focal_equivalent")]
|
||||||
|
public double? FocalLengthEquivalent { get; set; }
|
||||||
|
[JsonPropertyName("horizontal_resolution")]
|
||||||
|
public double? HorizontalResolution { get; set; }
|
||||||
|
[JsonPropertyName("iso")]
|
||||||
|
public ushort? IsoRating { get; set; }
|
||||||
|
[JsonPropertyName("lens")]
|
||||||
|
public string? Lens { get; set; }
|
||||||
|
[JsonPropertyName("light_source")]
|
||||||
|
public LightSource? LightSource { get; set; }
|
||||||
|
[JsonPropertyName("metering_mode")]
|
||||||
|
public MeteringMode? MeteringMode { get; set; }
|
||||||
|
[JsonPropertyName("resolution_unit")]
|
||||||
|
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||||
|
[JsonPropertyName("orientation")]
|
||||||
|
public Orientation? Orientation { get; set; }
|
||||||
|
[JsonPropertyName("saturation")]
|
||||||
|
public Saturation? Saturation { get; set; }
|
||||||
|
[JsonPropertyName("scene_capture_type")]
|
||||||
|
public SceneCaptureType? SceneCaptureType { get; set; }
|
||||||
|
[JsonPropertyName("sensing_method")]
|
||||||
|
public SensingMethod? SensingMethod { get; set; }
|
||||||
|
[JsonPropertyName("sharpness")]
|
||||||
|
public Sharpness? Sharpness { get; set; }
|
||||||
|
[JsonPropertyName("software")]
|
||||||
|
public string? SoftwareUsed { get; set; }
|
||||||
|
[JsonPropertyName("subject_distance_range")]
|
||||||
|
public SubjectDistanceRange? SubjectDistanceRange { get; set; }
|
||||||
|
[JsonPropertyName("upload_date")]
|
||||||
|
public DateTime UploadDate { get; set; }
|
||||||
|
[JsonPropertyName("vertical_resolution")]
|
||||||
|
public double? VerticalResolution { get; set; }
|
||||||
|
[JsonPropertyName("white_balance")]
|
||||||
|
public WhiteBalance? WhiteBalance { get; set; }
|
||||||
|
[JsonPropertyName("user_id")]
|
||||||
|
public string? UserId { get; set; }
|
||||||
|
[JsonPropertyName("license_name")]
|
||||||
|
public string? LicenseName { get; set; }
|
||||||
|
[JsonPropertyName("license_id")]
|
||||||
|
public int LicenseId { get; set; }
|
||||||
|
[JsonPropertyName("original_extension")]
|
||||||
|
public string OriginalExtension { get; set; }
|
||||||
|
}
|
||||||
61
Marechai.Data/Dtos/BaseScanDto.cs
Normal file
61
Marechai.Data/Dtos/BaseScanDto.cs
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using Marechai.Database;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class BaseScanDto : BaseDto<Guid>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("author")]
|
||||||
|
public string? Author { get; set; }
|
||||||
|
[JsonPropertyName("colorspace")]
|
||||||
|
public ColorSpace? ColorSpace { get; set; }
|
||||||
|
[JsonPropertyName("comments")]
|
||||||
|
public string? Comments { get; set; }
|
||||||
|
[JsonPropertyName("creation_date")]
|
||||||
|
public DateTime? CreationDate { get; set; }
|
||||||
|
[JsonPropertyName("exif_version")]
|
||||||
|
public string? ExifVersion { get; set; }
|
||||||
|
[JsonPropertyName("horizontal_resolution")]
|
||||||
|
public double? HorizontalResolution { get; set; }
|
||||||
|
[JsonPropertyName("resolution_unit")]
|
||||||
|
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||||
|
[JsonPropertyName("scanner_manufacturer")]
|
||||||
|
public string? ScannerManufacturer { get; set; }
|
||||||
|
[JsonPropertyName("scanner_model")]
|
||||||
|
public string? ScannerModel { get; set; }
|
||||||
|
[JsonPropertyName("software")]
|
||||||
|
public string? SoftwareUsed { get; set; }
|
||||||
|
[JsonPropertyName("upload_date")]
|
||||||
|
public DateTime UploadDate { get; set; }
|
||||||
|
[JsonPropertyName("vertical_resolution")]
|
||||||
|
public double? VerticalResolution { get; set; }
|
||||||
|
[JsonPropertyName("original_extension")]
|
||||||
|
public string OriginalExtension { get; set; }
|
||||||
|
[JsonPropertyName("user_id")]
|
||||||
|
public string? UserId { get; set; }
|
||||||
|
}
|
||||||
43
Marechai.Data/Dtos/BookByMachineDto.cs
Normal file
43
Marechai.Data/Dtos/BookByMachineDto.cs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class BookByMachineDto : BaseDto<long>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("book_id")]
|
||||||
|
[Required]
|
||||||
|
public long BookId { get; set; }
|
||||||
|
[JsonPropertyName("book")]
|
||||||
|
public string? Book { get; set; }
|
||||||
|
[JsonPropertyName("machine_id")]
|
||||||
|
[Required]
|
||||||
|
public int MachineId { get; set; }
|
||||||
|
[JsonPropertyName("machine")]
|
||||||
|
public string? Machine { get; set; }
|
||||||
|
}
|
||||||
43
Marechai.Data/Dtos/BookByMachineFamilyDto.cs
Normal file
43
Marechai.Data/Dtos/BookByMachineFamilyDto.cs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class BookByMachineFamilyDto : BaseDto<long>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("book_id")]
|
||||||
|
[Required]
|
||||||
|
public long BookId { get; set; }
|
||||||
|
[JsonPropertyName("book")]
|
||||||
|
public string? Book { get; set; }
|
||||||
|
[JsonPropertyName("machine_family_id")]
|
||||||
|
[Required]
|
||||||
|
public int MachineFamilyId { get; set; }
|
||||||
|
[JsonPropertyName("machine_family")]
|
||||||
|
public string? MachineFamily { get; set; }
|
||||||
|
}
|
||||||
42
Marechai.Data/Dtos/BookDto.cs
Normal file
42
Marechai.Data/Dtos/BookDto.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class BookDto : DocumentBaseDto
|
||||||
|
{
|
||||||
|
[JsonPropertyName("isbn")]
|
||||||
|
public string? Isbn { get; set; }
|
||||||
|
[JsonPropertyName("pages")]
|
||||||
|
public short? Pages { get; set; }
|
||||||
|
[JsonPropertyName("edition")]
|
||||||
|
public int? Edition { get; set; }
|
||||||
|
[JsonPropertyName("previous_id")]
|
||||||
|
public long? PreviousId { get; set; }
|
||||||
|
[JsonPropertyName("source_id")]
|
||||||
|
public long? SourceId { get; set; }
|
||||||
|
}
|
||||||
@@ -20,16 +20,19 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class BookScanDto : DocumentScanBaseDto
|
||||||
{
|
{
|
||||||
public class BookByMachineViewModel : BaseViewModel<long>
|
[JsonPropertyName("book_id")]
|
||||||
{
|
[Required]
|
||||||
public long BookId { get; set; }
|
public long BookId { get; set; }
|
||||||
public string Book { get; set; }
|
[JsonPropertyName("book")]
|
||||||
public int MachineId { get; set; }
|
public string? Book { get; set; }
|
||||||
public string Machine { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -20,22 +20,27 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
using System.ComponentModel.DataAnnotations;
|
||||||
{
|
using System.Text.Json.Serialization;
|
||||||
public class PersonByMagazineViewModel : BaseViewModel<long>
|
|
||||||
{
|
|
||||||
public int PersonId { get; set; }
|
|
||||||
public long MagazineId { get; set; }
|
|
||||||
public string RoleId { get; set; }
|
|
||||||
public string Role { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
public string Alias { get; set; }
|
|
||||||
public string Surname { get; set; }
|
|
||||||
public string DisplayName { get; set; }
|
|
||||||
|
|
||||||
public string FullName => DisplayName ?? Alias ?? $"{Name} {Surname}";
|
namespace Marechai.Data.Dtos;
|
||||||
}
|
|
||||||
|
public class CompanyByBookDto : BaseDto<long>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("company_id")]
|
||||||
|
[Required]
|
||||||
|
public int CompanyId { get; set; }
|
||||||
|
[JsonPropertyName("book_id")]
|
||||||
|
[Required]
|
||||||
|
public long BookId { get; set; }
|
||||||
|
[JsonPropertyName("role_id")]
|
||||||
|
[Required]
|
||||||
|
public required string RoleId { get; set; }
|
||||||
|
[JsonPropertyName("company")]
|
||||||
|
public string? Company { get; set; }
|
||||||
|
[JsonPropertyName("role")]
|
||||||
|
public string? Role { get; set; }
|
||||||
}
|
}
|
||||||
46
Marechai.Data/Dtos/CompanyByDocumentDto.cs
Normal file
46
Marechai.Data/Dtos/CompanyByDocumentDto.cs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class CompanyByDocumentDto : BaseDto<long>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("company_id")]
|
||||||
|
[Required]
|
||||||
|
public int CompanyId { get; set; }
|
||||||
|
[JsonPropertyName("document_id")]
|
||||||
|
[Required]
|
||||||
|
public long DocumentId { get; set; }
|
||||||
|
[JsonPropertyName("role_id")]
|
||||||
|
[Required]
|
||||||
|
public required string RoleId { get; set; }
|
||||||
|
[JsonPropertyName("company")]
|
||||||
|
public string? Company { get; set; }
|
||||||
|
[JsonPropertyName("role")]
|
||||||
|
public string? Role { get; set; }
|
||||||
|
}
|
||||||
46
Marechai.Data/Dtos/CompanyByMagazineDto.cs
Normal file
46
Marechai.Data/Dtos/CompanyByMagazineDto.cs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class CompanyByMagazineDto : BaseDto<long>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("company_id")]
|
||||||
|
[Required]
|
||||||
|
public int CompanyId { get; set; }
|
||||||
|
[JsonPropertyName("magazine_id")]
|
||||||
|
[Required]
|
||||||
|
public long MagazineId { get; set; }
|
||||||
|
[JsonPropertyName("role_id")]
|
||||||
|
[Required]
|
||||||
|
public required string RoleId { get; set; }
|
||||||
|
[JsonPropertyName("company")]
|
||||||
|
public string? Company { get; set; }
|
||||||
|
[JsonPropertyName("role")]
|
||||||
|
public string? Role { get; set; }
|
||||||
|
}
|
||||||
46
Marechai.Data/Dtos/CompanyBySoftwareFamilyDto.cs
Normal file
46
Marechai.Data/Dtos/CompanyBySoftwareFamilyDto.cs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class CompanyBySoftwareFamilyDto : BaseDto<ulong>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("company_id")]
|
||||||
|
[Required]
|
||||||
|
public int CompanyId { get; set; }
|
||||||
|
[JsonPropertyName("software_family_id")]
|
||||||
|
[Required]
|
||||||
|
public ulong SoftwareFamilyId { get; set; }
|
||||||
|
[JsonPropertyName("role_id")]
|
||||||
|
[Required]
|
||||||
|
public required string RoleId { get; set; }
|
||||||
|
[JsonPropertyName("company")]
|
||||||
|
public string? Company { get; set; }
|
||||||
|
[JsonPropertyName("role")]
|
||||||
|
public string? Role { get; set; }
|
||||||
|
}
|
||||||
46
Marechai.Data/Dtos/CompanyBySoftwareVariantDto.cs
Normal file
46
Marechai.Data/Dtos/CompanyBySoftwareVariantDto.cs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class CompanyBySoftwareVariantDto : BaseDto<ulong>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("company_id")]
|
||||||
|
[Required]
|
||||||
|
public int CompanyId { get; set; }
|
||||||
|
[JsonPropertyName("software_variant_id")]
|
||||||
|
[Required]
|
||||||
|
public ulong SoftwareVariantId { get; set; }
|
||||||
|
[JsonPropertyName("role_id")]
|
||||||
|
[Required]
|
||||||
|
public required string RoleId { get; set; }
|
||||||
|
[JsonPropertyName("company")]
|
||||||
|
public string? Company { get; set; }
|
||||||
|
[JsonPropertyName("role")]
|
||||||
|
public string? Role { get; set; }
|
||||||
|
}
|
||||||
46
Marechai.Data/Dtos/CompanyBySoftwareVersionDto.cs
Normal file
46
Marechai.Data/Dtos/CompanyBySoftwareVersionDto.cs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class CompanyBySoftwareVersionDto : BaseDto<ulong>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("company_id")]
|
||||||
|
[Required]
|
||||||
|
public int CompanyId { get; set; }
|
||||||
|
[JsonPropertyName("software_version_id")]
|
||||||
|
[Required]
|
||||||
|
public ulong SoftwareVersionId { get; set; }
|
||||||
|
[JsonPropertyName("role_id")]
|
||||||
|
[Required]
|
||||||
|
public required string RoleId { get; set; }
|
||||||
|
[JsonPropertyName("company")]
|
||||||
|
public string? Company { get; set; }
|
||||||
|
[JsonPropertyName("role")]
|
||||||
|
public string? Role { get; set; }
|
||||||
|
}
|
||||||
41
Marechai.Data/Dtos/CompanyDescriptionDto.cs
Normal file
41
Marechai.Data/Dtos/CompanyDescriptionDto.cs
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class CompanyDescriptionDto : BaseDto<int>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("markdown")]
|
||||||
|
[Required]
|
||||||
|
public required string Markdown { get; set; }
|
||||||
|
[JsonPropertyName("html")]
|
||||||
|
public string? Html { get; set; }
|
||||||
|
[JsonPropertyName("company_id")]
|
||||||
|
[Required]
|
||||||
|
public int CompanyId { get; set; }
|
||||||
|
}
|
||||||
81
Marechai.Data/Dtos/CompanyDto.cs
Normal file
81
Marechai.Data/Dtos/CompanyDto.cs
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using Marechai.Database;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class CompanyDto : BaseDto<int>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("name")]
|
||||||
|
[Required]
|
||||||
|
public required string Name { get; set; }
|
||||||
|
[JsonPropertyName("founded")]
|
||||||
|
public DateTime? Founded { get; set; }
|
||||||
|
[JsonPropertyName("website")]
|
||||||
|
public string? Website { get; set; }
|
||||||
|
[JsonPropertyName("twitter")]
|
||||||
|
public string? Twitter { get; set; }
|
||||||
|
[JsonPropertyName("facebook")]
|
||||||
|
public string? Facebook { get; set; }
|
||||||
|
[JsonPropertyName("sold")]
|
||||||
|
public DateTime? Sold { get; set; }
|
||||||
|
[JsonPropertyName("sold_to_id")]
|
||||||
|
public int? SoldToId { get; set; }
|
||||||
|
[JsonPropertyName("address")]
|
||||||
|
public string? Address { get; set; }
|
||||||
|
[JsonPropertyName("city")]
|
||||||
|
public string? City { get; set; }
|
||||||
|
[JsonPropertyName("province")]
|
||||||
|
public string? Province { get; set; }
|
||||||
|
[JsonPropertyName("postal_code")]
|
||||||
|
public string? PostalCode { get; set; }
|
||||||
|
[JsonPropertyName("country_id")]
|
||||||
|
public short? CountryId { get; set; }
|
||||||
|
[JsonPropertyName("status")]
|
||||||
|
public CompanyStatus Status { get; set; }
|
||||||
|
[JsonPropertyName("last_logo")]
|
||||||
|
public Guid? LastLogo { get; set; }
|
||||||
|
[JsonPropertyName("sold_to")]
|
||||||
|
public string? SoldTo { get; set; }
|
||||||
|
[JsonPropertyName("country")]
|
||||||
|
public string? Country { get; set; }
|
||||||
|
[JsonPropertyName("founded_day_is_unknown")]
|
||||||
|
public bool FoundedDayIsUnknown { get; set; }
|
||||||
|
[JsonPropertyName("founded_month_is_unknown")]
|
||||||
|
public bool FoundedMonthIsUnknown { get; set; }
|
||||||
|
[JsonPropertyName("sold_day_is_unknown")]
|
||||||
|
public bool SoldDayIsUnknown { get; set; }
|
||||||
|
[JsonPropertyName("sold_month_is_unknown")]
|
||||||
|
public bool SoldMonthIsUnknown { get; set; }
|
||||||
|
[JsonPropertyName("legal_name")]
|
||||||
|
public string? LegalName { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public string SoldView => Status != CompanyStatus.Active && Status != CompanyStatus.Unknown
|
||||||
|
? Sold?.ToShortDateString() ?? "Unknown"
|
||||||
|
: Sold?.ToShortDateString() ?? (SoldTo is null ? "" : "Unknown");
|
||||||
|
}
|
||||||
@@ -20,18 +20,21 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using Marechai.Database;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class CompanyLogoDto : BaseDto<int>
|
||||||
{
|
{
|
||||||
public class StorageByMachineViewModel : BaseViewModel<long>
|
[JsonPropertyName("company_id")]
|
||||||
{
|
[Required]
|
||||||
public int MachineId { get; set; }
|
public int CompanyId { get; set; }
|
||||||
public StorageType Type { get; set; }
|
|
||||||
public StorageInterface Interface { get; set; }
|
[JsonPropertyName("year")] public int? Year { get; set; }
|
||||||
public long? Capacity { get; set; }
|
|
||||||
}
|
[JsonPropertyName("guid")] [Required] public Guid Guid { get; set; }
|
||||||
}
|
}
|
||||||
42
Marechai.Data/Dtos/CurrencyInflationDto.cs
Normal file
42
Marechai.Data/Dtos/CurrencyInflationDto.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class CurrencyInflationDto : BaseDto<int>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("code")]
|
||||||
|
[Required]
|
||||||
|
public required string CurrencyCode { get; set; }
|
||||||
|
[JsonPropertyName("name")]
|
||||||
|
public string? CurrencyName { get; set; }
|
||||||
|
[JsonPropertyName("year")]
|
||||||
|
public uint Year { get; set; }
|
||||||
|
[JsonPropertyName("inflation")]
|
||||||
|
public float Inflation { get; set; }
|
||||||
|
}
|
||||||
49
Marechai.Data/Dtos/CurrencyPeggingDto.cs
Normal file
49
Marechai.Data/Dtos/CurrencyPeggingDto.cs
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class CurrencyPeggingDto : BaseDto<int>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("source_code")]
|
||||||
|
[Required]
|
||||||
|
public required string SourceCode { get; set; }
|
||||||
|
[JsonPropertyName("destination_code")]
|
||||||
|
[Required]
|
||||||
|
public required string DestinationCode { get; set; }
|
||||||
|
[JsonPropertyName("source_name")]
|
||||||
|
public string? SourceName { get; set; }
|
||||||
|
[JsonPropertyName("destination_name")]
|
||||||
|
public string? DestinationName { get; set; }
|
||||||
|
[JsonPropertyName("ratio")]
|
||||||
|
public float Ratio { get; set; }
|
||||||
|
[JsonPropertyName("start")]
|
||||||
|
public DateTime Start { get; set; }
|
||||||
|
[JsonPropertyName("end")]
|
||||||
|
public DateTime? End { get; set; }
|
||||||
|
}
|
||||||
@@ -20,15 +20,27 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public abstract class DocumentBaseDto : BaseDto<long>
|
||||||
{
|
{
|
||||||
public class ScreenByMachineViewModel : BaseViewModel<long>
|
[JsonPropertyName("title")]
|
||||||
{
|
[Required]
|
||||||
public int MachineId { get; set; }
|
public required string Title { get; set; }
|
||||||
public ScreenViewModel Screen { get; set; }
|
[JsonPropertyName("native_title")]
|
||||||
public int ScreenId { get; set; }
|
public string? NativeTitle { get; set; }
|
||||||
}
|
[JsonPropertyName("published")]
|
||||||
|
public DateTime? Published { get; set; }
|
||||||
|
[JsonPropertyName("country_id")]
|
||||||
|
public short? CountryId { get; set; }
|
||||||
|
[JsonPropertyName("country")]
|
||||||
|
public string? Country { get; set; }
|
||||||
|
[JsonPropertyName("synopsis")]
|
||||||
|
public string? Synopsis { get; set; }
|
||||||
}
|
}
|
||||||
43
Marechai.Data/Dtos/DocumentByMachineDto.cs
Normal file
43
Marechai.Data/Dtos/DocumentByMachineDto.cs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class DocumentByMachineDto : BaseDto<long>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("document_id")]
|
||||||
|
[Required]
|
||||||
|
public long DocumentId { get; set; }
|
||||||
|
[JsonPropertyName("document")]
|
||||||
|
public string? Document { get; set; }
|
||||||
|
[JsonPropertyName("machine_id")]
|
||||||
|
[Required]
|
||||||
|
public int MachineId { get; set; }
|
||||||
|
[JsonPropertyName("machine")]
|
||||||
|
public string? Machine { get; set; }
|
||||||
|
}
|
||||||
43
Marechai.Data/Dtos/DocumentByMachineFamilyDto.cs
Normal file
43
Marechai.Data/Dtos/DocumentByMachineFamilyDto.cs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class DocumentByMachineFamilyDto : BaseDto<long>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("document_id")]
|
||||||
|
[Required]
|
||||||
|
public long DocumentId { get; set; }
|
||||||
|
[JsonPropertyName("document")]
|
||||||
|
public string? Document { get; set; }
|
||||||
|
[JsonPropertyName("machine_family_id")]
|
||||||
|
[Required]
|
||||||
|
public int MachineFamilyId { get; set; }
|
||||||
|
[JsonPropertyName("machine_family")]
|
||||||
|
public string? MachineFamily { get; set; }
|
||||||
|
}
|
||||||
@@ -20,18 +20,21 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class DocumentCompanyDto : BaseDto<int>
|
||||||
{
|
{
|
||||||
public class DocumentCompanyViewModel : BaseViewModel<int>
|
[JsonPropertyName("name")]
|
||||||
{
|
public string? Name { get; set; }
|
||||||
public string Name { get; set; }
|
[DisplayName("Linked company")]
|
||||||
[DisplayName("Linked company")]
|
[JsonPropertyName("company")]
|
||||||
public string Company { get; set; }
|
public string? Company { get; set; }
|
||||||
public int? CompanyId { get; set; }
|
[JsonPropertyName("company_id")]
|
||||||
}
|
public int? CompanyId { get; set; }
|
||||||
}
|
}
|
||||||
@@ -20,14 +20,9 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
namespace Marechai.Data.Dtos;
|
||||||
{
|
|
||||||
public class BookScanViewModel : DocumentScanBaseViewModel
|
public class DocumentDto : DocumentBaseDto {}
|
||||||
{
|
|
||||||
public long BookId { get; set; }
|
|
||||||
public string Book { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -20,24 +20,30 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class DocumentPersonDto : BaseDto<int>
|
||||||
{
|
{
|
||||||
public class SoftwareVersionViewModel : BaseViewModel<ulong>
|
[JsonPropertyName("name")]
|
||||||
{
|
[Required]
|
||||||
public string Family { get; set; }
|
public required string Name { get; set; }
|
||||||
public string Name { get; set; }
|
[JsonPropertyName("person")]
|
||||||
public string Codename { get; set; }
|
public string? Person { get; set; }
|
||||||
public string Version { get; set; }
|
[JsonPropertyName("person_id")]
|
||||||
public DateTime? Introduced { get; set; }
|
public int? PersonId { get; set; }
|
||||||
public string Previous { get; set; }
|
[JsonPropertyName("alias")]
|
||||||
public string License { get; set; }
|
public string? Alias { get; set; }
|
||||||
public ulong FamilyId { get; set; }
|
[JsonPropertyName("surname")]
|
||||||
public int? LicenseId { get; set; }
|
public string? Surname { get; set; }
|
||||||
public ulong? PreviousId { get; set; }
|
[JsonPropertyName("display_name")]
|
||||||
}
|
public string? DisplayName { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public string FullName => DisplayName ?? Alias ?? $"{Name} {Surname}";
|
||||||
}
|
}
|
||||||
@@ -20,18 +20,19 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class DocumentRoleDto : BaseDto<string>
|
||||||
{
|
{
|
||||||
public class SoftwareFamilyViewModel : BaseViewModel<ulong>
|
[JsonPropertyName("name")]
|
||||||
{
|
[Required]
|
||||||
public string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public DateTime? Introduced { get; set; }
|
[JsonPropertyName("enabled")]
|
||||||
public string Parent { get; set; }
|
public bool Enabled { get; set; }
|
||||||
public ulong? ParentId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -20,16 +20,18 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using Marechai.Database;
|
using Marechai.Database;
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class DocumentScanBaseDto : BaseScanDto
|
||||||
{
|
{
|
||||||
public class DocumentScanBaseViewModel : BaseScanViewModel
|
[JsonPropertyName("type")]
|
||||||
{
|
public DocumentScanType Type { get; set; }
|
||||||
public DocumentScanType Type { get; set; }
|
[JsonPropertyName("page")]
|
||||||
public uint? Page { get; set; }
|
public uint? Page { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -20,16 +20,19 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class DocumentScanDto : DocumentScanBaseDto
|
||||||
{
|
{
|
||||||
public class BookByMachineFamilyViewModel : BaseViewModel<long>
|
[JsonPropertyName("document_id")]
|
||||||
{
|
[Required]
|
||||||
public long BookId { get; set; }
|
public long DocumentId { get; set; }
|
||||||
public string Book { get; set; }
|
[JsonPropertyName("document")]
|
||||||
public int MachineFamilyId { get; set; }
|
public string? Document { get; set; }
|
||||||
public string MachineFamily { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
50
Marechai.Data/Dtos/DumpDto.cs
Normal file
50
Marechai.Data/Dtos/DumpDto.cs
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class DumpDto : BaseDto<ulong>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("dumper")]
|
||||||
|
[Required]
|
||||||
|
public required string Dumper { get; set; }
|
||||||
|
[JsonPropertyName("user_id")]
|
||||||
|
public string? UserId { get; set; }
|
||||||
|
[JsonPropertyName("dumping_group")]
|
||||||
|
public string? DumpingGroup { get; set; }
|
||||||
|
[JsonPropertyName("dump_date")]
|
||||||
|
public DateTime? DumpDate { get; set; }
|
||||||
|
[JsonPropertyName("username")]
|
||||||
|
public string? UserName { get; set; }
|
||||||
|
[JsonPropertyName("media_id")]
|
||||||
|
public ulong MediaId { get; set; }
|
||||||
|
[JsonPropertyName("media_title")]
|
||||||
|
public string? MediaTitle { get; set; }
|
||||||
|
[JsonPropertyName("media_dump_id")]
|
||||||
|
public ulong MediaDumpId { get; set; }
|
||||||
|
}
|
||||||
43
Marechai.Data/Dtos/GpuByMachineDto.cs
Normal file
43
Marechai.Data/Dtos/GpuByMachineDto.cs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class GpuByMachineDto : BaseDto<long>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("gpu_id")]
|
||||||
|
[Required]
|
||||||
|
public int GpuId { get; set; }
|
||||||
|
[JsonPropertyName("machine_id")]
|
||||||
|
[Required]
|
||||||
|
public int MachineId { get; set; }
|
||||||
|
[JsonPropertyName("company")]
|
||||||
|
public string? CompanyName { get; set; }
|
||||||
|
[JsonPropertyName("name")]
|
||||||
|
public string? Name { get; set; }
|
||||||
|
}
|
||||||
@@ -20,27 +20,37 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class GpuDto : BaseDto<int>
|
||||||
{
|
{
|
||||||
public class SoundSynthViewModel : BaseViewModel<int>
|
[JsonPropertyName("name")]
|
||||||
{
|
[Required]
|
||||||
public string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public string CompanyName { get; set; }
|
[JsonPropertyName("company_id")]
|
||||||
public int? CompanyId { get; set; }
|
public int? CompanyId { get; set; }
|
||||||
public string ModelCode { get; set; }
|
[JsonPropertyName("company")]
|
||||||
public DateTime? Introduced { get; set; }
|
public string? Company { get; set; }
|
||||||
public int? Voices { get; set; }
|
[JsonPropertyName("model_code")]
|
||||||
public double? Frequency { get; set; }
|
public string? ModelCode { get; set; }
|
||||||
public int? Depth { get; set; }
|
[JsonPropertyName("introduced")]
|
||||||
public int? SquareWave { get; set; }
|
public DateTime? Introduced { get; set; }
|
||||||
public int? WhiteNoise { get; set; }
|
[JsonPropertyName("package")]
|
||||||
public int? Type { get; set; }
|
public string? Package { get; set; }
|
||||||
|
[JsonPropertyName("process")]
|
||||||
public string IntroducedView => Introduced?.ToShortDateString() ?? "Unknown";
|
public string? Process { get; set; }
|
||||||
}
|
[JsonPropertyName("process_nm")]
|
||||||
|
public float? ProcessNm { get; set; }
|
||||||
|
[JsonPropertyName("die_size")]
|
||||||
|
public float? DieSize { get; set; }
|
||||||
|
[JsonPropertyName("transistors")]
|
||||||
|
public long? Transistors { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public string IntroducedView => Introduced?.ToShortDateString() ?? "Unknown";
|
||||||
}
|
}
|
||||||
@@ -20,16 +20,15 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class InstructionSetDto : BaseDto<int>
|
||||||
{
|
{
|
||||||
public class MagazineViewModel : DocumentBaseViewModel
|
[JsonPropertyName("name")] [Required] public required string Name { get; set; }
|
||||||
{
|
|
||||||
public string Issn { get; set; }
|
|
||||||
public DateTime? FirstPublication { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -20,17 +20,24 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class InstructionSetExtensionByProcessorDto : BaseDto<int>
|
||||||
{
|
{
|
||||||
public class CompanyByDocumentViewModel : BaseViewModel<long>
|
[JsonPropertyName("extensions")]
|
||||||
{
|
public string? Extension { get; set; }
|
||||||
public int CompanyId { get; set; }
|
[JsonPropertyName("processor")]
|
||||||
public long DocumentId { get; set; }
|
public string? Processor { get; set; }
|
||||||
public string RoleId { get; set; }
|
[JsonPropertyName("processor_id")]
|
||||||
public string Company { get; set; }
|
[Required]
|
||||||
public string Role { get; set; }
|
public int ProcessorId { get; set; }
|
||||||
}
|
[JsonPropertyName("extension_id")]
|
||||||
|
[Required]
|
||||||
|
public int ExtensionId { get; set; }
|
||||||
}
|
}
|
||||||
@@ -20,15 +20,17 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class InstructionSetExtensionDto : BaseDto<int>
|
||||||
{
|
{
|
||||||
public class CompanyDescriptionViewModel : BaseViewModel<int>
|
[JsonPropertyName("extension")]
|
||||||
{
|
[Required]
|
||||||
public string Markdown { get; set; }
|
public required string Extension { get; set; }
|
||||||
public string Html { get; set; }
|
|
||||||
public int CompanyId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -20,16 +20,17 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2021 Natalia Portillo
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Marechai.ViewModels
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class Iso31661NumericDto
|
||||||
{
|
{
|
||||||
public class CurrencyInflationViewModel : BaseViewModel<int>
|
[JsonPropertyName("id")] [Required] public short Id { get; set; }
|
||||||
{
|
|
||||||
public string CurrencyCode { get; set; }
|
[JsonPropertyName("name")] [Required] public required string Name { get; set; }
|
||||||
public string CurrencyName { get; set; }
|
|
||||||
public uint Year { get; set; }
|
|
||||||
public float Inflation { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
44
Marechai.Data/Dtos/Iso4217Dto.cs
Normal file
44
Marechai.Data/Dtos/Iso4217Dto.cs
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class Iso4217Dto
|
||||||
|
{
|
||||||
|
[JsonPropertyName("code")] [Required] public required string Code { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("numeric")]
|
||||||
|
[Required]
|
||||||
|
public short Numeric { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("minor_units")] public byte? MinorUnits { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("name")] [Required] public required string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("withdrawn")] public DateTime? Withdrawn { get; set; }
|
||||||
|
}
|
||||||
48
Marechai.Data/Dtos/LicenseDto.cs
Normal file
48
Marechai.Data/Dtos/LicenseDto.cs
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class LicenseDto : BaseDto<int>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("name")] [Required] public string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("spdx")] public string? SPDX { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("fsf_approved")]
|
||||||
|
[Required]
|
||||||
|
public bool FsfApproved { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("osi_approved")]
|
||||||
|
[Required]
|
||||||
|
public bool OsiApproved { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("link")] public string? Link { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("text")] public string? Text { get; set; }
|
||||||
|
}
|
||||||
67
Marechai.Data/Dtos/MachineDto.cs
Normal file
67
Marechai.Data/Dtos/MachineDto.cs
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||||
|
//
|
||||||
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright © 2003-2026 Natalia Portillo
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using Marechai.Database;
|
||||||
|
|
||||||
|
namespace Marechai.Data.Dtos;
|
||||||
|
|
||||||
|
public class MachineDto : BaseDto<int>
|
||||||
|
{
|
||||||
|
[JsonPropertyName("name")] [Required] public required string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("model")] public string? Model { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("company_id")] public int CompanyId { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("company_logo")] public Guid? CompanyLogo { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("introduced")] public DateTime? Introduced { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("family_id")] public int? FamilyId { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("family_name")] public string? FamilyName { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore] public List<GpuDto>? Gpus { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore] public List<MemoryDto>? Memory { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore] public List<ProcessorDto>? Processors { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore] public List<SoundSynthDto>? SoundSynthesizers { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore] public List<StorageDto>? Storage { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("company")] public string? Company { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("type")] public MachineType Type { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("family")] public string? Family { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public string IntroducedView =>
|
||||||
|
Introduced?.Year == 1000 ? "Prototype" : Introduced?.ToShortDateString() ?? "Unknown";
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user