5.9 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-16T12:13:05.880610+00:00 | zai-org/GLM-5-FP8 | 1 | adb5cdc8cb4cf74e |
Documentation: DTS.Common.Core Test Metadata Interfaces
1. Purpose
This module defines three data contract interfaces—ITestEngineerDetailsDbRecord, ICustomerDetailsDbRecord, and ILabratoryDetailsDbRecord—within the DTS.Common.Interface.TestMetaData namespace. These interfaces abstract the database schema for test metadata entities, mapping properties to specific database columns using System.ComponentModel.DataAnnotations attributes. They serve as the data access layer contracts for Test Engineer, Customer, and Laboratory records, likely supporting an ORM framework such as Entity Framework.
2. Public Interface
ITestEngineerDetailsDbRecord
Defines the contract for a record in the TestEngineerDetails database table.
Properties:
int TestEngineerId { get; set; }: The primary key for the record. Mapped to the columnTestEngineerId.string Name { get; set; }: Mapped to the columnName.string TestEngineerName { get; set; }: Mapped to the columnTestEngineerName.string TestEngineerPhone { get; set; }: Mapped to the columnTestEngineerPhone.string TestEngineerFax { get; set; }: Mapped to the columnTestEngineerFax.string TestEngineerEmail { get; set; }: Mapped to the columnTestEngineerEmail.bool LocalOnly { get; set; }: Mapped to the columnLocalOnly.DateTime LastModified { get; set; }: Mapped to the columnLastModified.string LastModifiedBy { get; set; }: Mapped to the columnLastModifiedBy.int Version { get; set; }: Mapped to the columnVersion.
ICustomerDetailsDbRecord
Defines the contract for a record in the CustomerDetails database table.
Properties:
int CustomerId { get; set; }: The primary key for the record. Mapped to the columnCustomerId.string Name { get; set; }: Mapped to the columnName.string CustomerName { get; set; }: Mapped to the columnCustomerName.string CustomerTestRefNumber { get; set; }: Mapped to the columnCustomerTestRefNumber.string ProjectRefNumber { get; set; }: Mapped to the columnProjectRefNumber.string CustomerOrderNumber { get; set; }: Mapped to the columnCustomerOrderNumber.string CustomerCostUnit { get; set; }: Mapped to the columnCustomerCostUnit.bool LocalOnly { get; set; }: Mapped to the columnLocalOnly.DateTime LastModified { get; set; }: Mapped to the columnLastModified.string LastModifiedBy { get; set; }: Mapped to the columnLastModifiedBy.int Version { get; set; }: Mapped to the columnVersion.
ILabratoryDetailsDbRecord
Defines the contract for a record in the LabratoryDetails database table.
Properties:
int LabratoryId { get; set; }: The primary key for the record. Mapped to the columnLabratoryId.string Name { get; set; }: Mapped to the columnName.string LabratoryName { get; set; }: Mapped to the columnLabratoryName.string LabratoryContactName { get; set; }: Mapped to the columnLabratoryContactName.string LabratoryContactPhone { get; set; }: Mapped to the columnLabratoryContactPhone.string LabratoryContactFax { get; set; }: Mapped to the columnLabratoryContactFax.string LabratoryContactEmail { get; set; }: Mapped to the columnLabratoryContactEmail.string LabratoryTestRefNumber { get; set; }: Mapped to the columnLabratoryTestRefNumber.string LabratoryProjectRefNumber { get; set; }: Mapped to the columnLabratoryProjectRefNumber.DateTime LastModified { get; set; }: Mapped to the columnLastModified.string LastModifiedBy { get; set; }: Mapped to the columnLastModifiedBy.bool LocalOnly { get; set; }: Mapped to the columnLocalOnly.int Version { get; set; }: Mapped to the columnVersion.
3. Invariants
- Primary Keys: Each interface requires an integer-based primary key property (
TestEngineerId,CustomerId,LabratoryId) decorated with the[Key]attribute. - Column Mapping: All properties are explicitly mapped to database columns using the
[Column("...")]attribute. - Audit Trail: All three interfaces guarantee the existence of
LastModified(DateTime),LastModifiedBy(string), andVersion(int) properties. - Locality: All three interfaces guarantee a
LocalOnlyboolean flag.
4. Dependencies
- System.ComponentModel.DataAnnotations: Used for the
[Key]attribute. - System.ComponentModel.DataAnnotations.Schema: Used for the
[Column]attribute. - System: Used for basic types (
String,Int32,DateTime,Boolean). - Consumers: Unknown from source alone, but these interfaces are likely implemented by concrete entity classes consumed by a database context (e.g., Entity Framework
DbContext).
5. Gotchas
- Spelling Error: The interface
ILabratoryDetailsDbRecordand its associated properties/columns (e.g.,LabratoryId,LabratoryName) misspell "Laboratory" as "Labratory". This typo appears to be embedded in the codebase and likely mirrors a typo in the underlying database schema. - Redundant Name Fields: Both
ITestEngineerDetailsDbRecordandICustomerDetailsDbRecorddefine a genericNameproperty alongside a more specificTestEngineerNameorCustomerNameproperty. The semantic difference between these two fields is unclear from the source code alone. - Nullable Reference Types: The source code does not enable nullable reference types (no
#nullable enabledirective or?annotations on string properties). Consumers should assume strings are nullable or verify data integrity at runtime.