import datetime
from typing import Optional

from pydantic import PositiveInt
from sqlalchemy import Integer, ForeignKey
from sqlmodel import Field, Column, DateTime, Relationship, SQLModel
from sqlalchemy import UniqueConstraint
from sb_backend.app.models.base.base_model import TimeStampMixin

from sb_backend.app.models.fields import SeriesCode
from .noseries import NoSeries

class NoSeriesLineBase(SQLModel):
    """«No. Series Line» («Серия Номеров Строка»)"""
    starting_date:  datetime.datetime = Field(
      sa_column=Column(
          