Skip to content

Commit

Permalink
Add: Source model
Browse files Browse the repository at this point in the history
  • Loading branch information
n-thumann authored and greenbonebot committed Mar 6, 2025
1 parent 25a2369 commit b0374c5
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pontos/nvd/models/source.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-FileCopyrightText: 2022-2023 Greenbone AG
#
# SPDX-License-Identifier: GPL-3.0-or-later
#

from dataclasses import dataclass, field
from datetime import datetime
from typing import List, Optional

from pontos.models import Model


@dataclass
class AcceptanceLevel(Model):
description: str
last_modified: datetime


@dataclass
class Source(Model):
last_modified: datetime
created: datetime
name: Optional[str] = None
source_identifiers: List[str] = field(default_factory=list)
contact_email: Optional[str] = None
v2_acceptance_level: Optional[AcceptanceLevel] = None
v3_acceptance_level: Optional[AcceptanceLevel] = None
cwe_acceptance_level: Optional[AcceptanceLevel] = None

0 comments on commit b0374c5

Please sign in to comment.