Skip to content

Commit

Permalink
fix: put back missing pid_names file
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirman committed Nov 5, 2024
1 parent 4db48cc commit 117c870
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/aind_data_schema_models/pid_names.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""Module for pidname definitions"""

from typing import Optional

from pydantic import BaseModel, ConfigDict, Field


class BaseName(BaseModel):
"""A simple model associating a name with an abbreviation"""

model_config = ConfigDict(extra="forbid", use_enum_values=True)

name: str = Field(..., title="Name")
abbreviation: Optional[str] = Field(default=None, title="Abbreviation")


class PIDName(BaseName):
"""
Model for associate a name with a persistent identifier (PID),
the registry for that PID, and abbreviation for that registry
"""

registry: Optional[BaseName] = Field(default=None, title="Registry")
registry_identifier: Optional[str] = Field(default=None, title="Registry identifier")

0 comments on commit 117c870

Please sign in to comment.