dn-scribe commited on
Commit
45f4b80
·
1 Parent(s): 4c44902

fix: some doc strings

Browse files
Files changed (1) hide show
  1. models.py +10 -10
models.py CHANGED
@@ -188,16 +188,16 @@ class Attestation(db.Model):
188
 
189
  id = db.Column(Integer, primary_key=True, doc="Primary key")
190
  key = db.Column(String(255), nullable=False, doc="Unique identifier for the attestation") # Unique identifier for the attestation
191
- target_name = db.Column(String(255), nullable=False, doc="Target name")
192
- target_type = db.Column(String(100), nullable=False, doc="Target type")
193
- content_type = db.Column(String(100), nullable=False, doc="Content type")
194
- context_type = db.Column(String(100), nullable=False, doc="Context type")
195
- tool = db.Column(String(100), doc="Tool that generated the attestation")
196
  sig_status = db.Column(String(50), default='unsigned', doc="Signature status (default 'unsigned')")
197
- deliverable = db.Column(Boolean, default=False, doc="Whether this attestation is deliverable")
198
 
199
  # Context fields for deduplication
200
- product_key = db.Column(String(255), doc="Product key for deduplication")
201
  product_version = db.Column(String(100), doc="Product version")
202
  labels = db.Column(JSON, doc="Labels as JSON array") # Store as JSON array
203
 
@@ -215,9 +215,9 @@ class Attestation(db.Model):
215
 
216
  # Metadata
217
  user_id = db.Column(Integer, ForeignKey('users.id'), doc="ID of the user who created the attestation")
218
- team_id = db.Column(Integer, doc="Team ID")
219
- job_ids = db.Column(JSON, doc="Job IDs as JSON array") # Store as JSON array
220
- pipeline_run = db.Column(Integer, doc="Pipeline run number")
221
  upload_pending = db.Column(Boolean, default=False, doc="True if upload is pending") # True if waiting for file upload
222
 
223
  # Timestamps
 
188
 
189
  id = db.Column(Integer, primary_key=True, doc="Primary key")
190
  key = db.Column(String(255), nullable=False, doc="Unique identifier for the attestation") # Unique identifier for the attestation
191
+ target_name = db.Column(String(255), nullable=False, doc="Attestation Target name (e.g. image/file/repo name)")
192
+ target_type = db.Column(String(100), nullable=False, doc="Target type (e.g. container, file, git, etc.)")
193
+ content_type = db.Column(String(100), nullable=False, doc="Content type (e.g. cyclonedx-json)")
194
+ context_type = db.Column(String(100), nullable=False, doc="Context type (e.g. local, github, gitlab, etc.)")
195
+ tool = db.Column(String(100), doc="Tool that generated the attestation (usually valint)")
196
  sig_status = db.Column(String(50), default='unsigned', doc="Signature status (default 'unsigned')")
197
+ deliverable = db.Column(Boolean, default=False, doc="Whether this attestation is of a deliverable artifact")
198
 
199
  # Context fields for deduplication
200
+ product_key = db.Column(String(255), doc="Product key (name) for deduplication")
201
  product_version = db.Column(String(100), doc="Product version")
202
  labels = db.Column(JSON, doc="Labels as JSON array") # Store as JSON array
203
 
 
215
 
216
  # Metadata
217
  user_id = db.Column(Integer, ForeignKey('users.id'), doc="ID of the user who created the attestation")
218
+ team_id = db.Column(Integer, doc="Team ID. Not in use yet.")
219
+ job_ids = db.Column(JSON, doc="Job IDs as JSON array (backward compatibility)") # Store as JSON array
220
+ pipeline_run = db.Column(Integer, doc="Pipeline run number (backward compatibility)")
221
  upload_pending = db.Column(Boolean, default=False, doc="True if upload is pending") # True if waiting for file upload
222
 
223
  # Timestamps