Commit Graph

25 Commits

Author SHA1 Message Date
f3b1ecb7a3 FEAT-13: Abgabevertrag placeholder template from her sample contract (18 {{tokens}}, PII scrubbed incl. docProps/mailto-rel, animal photos removed, Zucht logo kept, boilerplate verbatim)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 01:03:25 +02:00
7627468b82 DATA-2: optional list params + normalize frontend's '==' Gridify operator
- GridifyParams wrapper: nullable page/pageSize/filter/orderBy so list endpoints
  work with no query params (Gridify's non-nullable int Page made [AsParameters]
  treat them as required -> 400). Defaults page=1,pageSize=20.
- Normalize incoming filter '==' -> '=' : the frontend gridify.ts emits '==' for
  equals (its convention) but Gridify's equals is '='. Safe (values are escaped;
  != >= <= =* contain no '=='). Fixes status==Active (frontend default that 500'd).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 01:00:35 +02:00
263ba32e3c DATA-2: fresh Npgsql InitialCreate migration + ColorVariety seed (18)
8 tables (Gerbils, Litters, Contacts, Enclosures, ColorVarieties, GerbilPhotos,
HealthRecords, WeightRecords); enums as text columns; ColorVariety HasData seed
of the 18 GEN-1 base varieties. Replaces the prior pre-DATA-2 InitialCreate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 00:54:56 +02:00
180d53b203 DATA-2: new schema entities + Minimal API endpoints + Scalar + DAL teardown
- Entities: Breeder->Contact, +Enclosure/ColorVariety/GerbilPhoto/HealthRecord/WeightRecord;
  Gerbil expanded (single Genotype text col, Status/Gender enums-as-string, FK ids,
  ImportSource/ExternalRef provenance); Litter Strength->TotalBorn +ExpectedGoHomeDate/Notes.
  ColorVariety HasData seed = 18 from GEN-1 catalog. Gerbil<->Litter cycle handled
  (SetNull/Restrict). Enums stored as strings.
- Minimal API (no controllers): Endpoints/*.cs MapGroup+TypedResults for gerbils, litters,
  contacts, enclosures, color-varieties, health/weight-records, inbreeding (converted from
  controller, same routes/shapes), photos (Oscar contract: GET array/POST multipart/DELETE,
  url /photos/files/{fileName}). Gridify paged {items,totalCount,page,pageSize}, camelCase,
  409 conflict-deletes, flat FK ids, litter parent-gender validation (400 {code,...}).
- Scalar replaces Swashbuckle (AddOpenApi/MapOpenApi + MapScalarApiReference at /scalar);
  launchUrl swagger->scalar. GenericRepository/UnitOfWork/Converters deleted; DbContext direct.
- InbreedingService reads real FK props now; pure calculator + 8 tests untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 00:53:49 +02:00
0c94a6ecd3 FEAT-1b: Inzuchtkoeffizient endpoints via Wright path method
- PedigreeCalculator: pure, EF-free Wright path-method engine (recursive F_A,
  per-common-ancestor contributions, generationsAvailable, cycle guards)
- InbreedingService: loads pedigree from ApplicationContext shadow FKs
  (Gerbils.LitterId, Litters.FatherId/MotherId) into in-memory maps
- InbreedingController: GET /gerbils/{id}/inbreeding-coefficient,
  POST /genetics/test-inbreeding (hypothetical pairing for Probeverpaarung)
- Injects ApplicationContext directly; no Program.cs change (Dwight owns it)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 00:10:19 +02:00
3cf6413fcc ARCH-2b: permissive LAN CORS + bind API on 0.0.0.0, drop HTTPS redirect
- AddCors lan policy (AllowAnyOrigin/Header/Method) — trusted home LAN, no auth
- Widen ASPNETCORE_URLS host localhost/127.0.0.1 -> 0.0.0.0 (keep Aspire-assigned port)
- Remove dev HTTPS redirection so phones reach the API over plain HTTP

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 23:46:59 +02:00
9b9cf2b35a ARCH-2: apply EF migrations on startup in Development
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 23:37:42 +02:00
cc589b13d0 ARCH-2: fresh Npgsql initial migration
uuid keys, text columns, Gender persisted as text via EnumToStringConverter,
Litter.Date as timestamptz. Replaces deleted SqlServer initialCreate (no prod data).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 23:37:21 +02:00
84de905469 ARCH-2: wire PostgreSQL through Aspire
- AppHost: AddPostgres(postgres).WithDataVolume() + AddDatabase(gerbilmanager),
  WebAPI project resource WithReference/WaitFor on the db (Aspire-generated credentials)
- WebAPI: AddNpgsqlDbContext<ApplicationContext>(gerbilmanager) replaces manual
  AddDbContext/UseNpgsql + appsettings connection string

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 23:36:06 +02:00
4d541fe9cd ARCH-2: add Aspire AppHost + ServiceDefaults (Aspire 13.4.2)
- New projects GerbilManager.AppHost / GerbilManager.ServiceDefaults (templates)
- Added both to GerbilManager.slnx
- WebAPI references ServiceDefaults; AddServiceDefaults + MapDefaultEndpoints wired

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 23:35:15 +02:00
8820cc7751 ARCH-2: swap EF provider to Npgsql, drop SqlServer migrations + conn strings
- Microsoft.EntityFrameworkCore.SqlServer -> Npgsql.EntityFrameworkCore.PostgreSQL 10.0.2
- UseSqlServer -> UseNpgsql (Aspire-injected gerbilmanager connection)
- Removed hardcoded sa connection strings from appsettings*.json
- Deleted SqlServer-flavored initial migration (fresh Npgsql one follows; no prod data)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 23:34:00 +02:00
b041d84b18 ARCH-2: bump TFM to net10.0, EF Core/OpenApi to 10.0.8, Swashbuckle to 10.2.1
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 23:32:47 +02:00
c337c3dfd5 Resolve all warnings 2023-10-30 22:08:02 +01:00
08983ba30d Adjust 2023-10-30 21:58:56 +01:00
5792d2fcf4 Add database commits 2023-10-30 21:22:06 +01:00
6556e17146 Add first sanity check 2023-10-30 21:20:19 +01:00
d3d2b4b989 Implement generic repo pattern and unitofwork 2023-10-30 20:56:37 +01:00
Julian
dee8de7a15 Fix nullable 2023-10-30 17:18:23 +01:00
Julian
d58f874162 Add docker support 2023-10-30 16:39:14 +01:00
136ce48385 Fix reference empty guid 2023-10-23 21:42:56 +02:00
64a065058a mark required fields 2023-10-23 21:34:00 +02:00
1aa4f0b5f6 First table in database 2023-10-23 21:29:19 +02:00
Julian
00fd8ded6e Pass in sql connection configuration 2023-10-21 14:59:53 +02:00
Julian
c00f650c42 Rename project to webAPI 2023-10-21 14:23:54 +02:00
Julian
a986e3546a Move webapi to sub folder 2023-10-21 14:02:51 +02:00