| 1 | // Code generated by sqlc. DO NOT EDIT. |
| 2 | // versions: |
| 3 | // sqlc v1.31.1 |
| 4 | |
| 5 | package usersdb |
| 6 | |
| 7 | import ( |
| 8 | "database/sql/driver" |
| 9 | "fmt" |
| 10 | "net/netip" |
| 11 | |
| 12 | "github.com/jackc/pgx/v5/pgtype" |
| 13 | ) |
| 14 | |
| 15 | type CollabRole string |
| 16 | |
| 17 | const ( |
| 18 | CollabRoleRead CollabRole = "read" |
| 19 | CollabRoleTriage CollabRole = "triage" |
| 20 | CollabRoleWrite CollabRole = "write" |
| 21 | CollabRoleMaintain CollabRole = "maintain" |
| 22 | CollabRoleAdmin CollabRole = "admin" |
| 23 | ) |
| 24 | |
| 25 | func (e *CollabRole) Scan(src interface{}) error { |
| 26 | switch s := src.(type) { |
| 27 | case []byte: |
| 28 | *e = CollabRole(s) |
| 29 | case string: |
| 30 | *e = CollabRole(s) |
| 31 | default: |
| 32 | return fmt.Errorf("unsupported scan type for CollabRole: %T", src) |
| 33 | } |
| 34 | return nil |
| 35 | } |
| 36 | |
| 37 | type NullCollabRole struct { |
| 38 | CollabRole CollabRole |
| 39 | Valid bool // Valid is true if CollabRole is not NULL |
| 40 | } |
| 41 | |
| 42 | // Scan implements the Scanner interface. |
| 43 | func (ns *NullCollabRole) Scan(value interface{}) error { |
| 44 | if value == nil { |
| 45 | ns.CollabRole, ns.Valid = "", false |
| 46 | return nil |
| 47 | } |
| 48 | ns.Valid = true |
| 49 | return ns.CollabRole.Scan(value) |
| 50 | } |
| 51 | |
| 52 | // Value implements the driver Valuer interface. |
| 53 | func (ns NullCollabRole) Value() (driver.Value, error) { |
| 54 | if !ns.Valid { |
| 55 | return nil, nil |
| 56 | } |
| 57 | return string(ns.CollabRole), nil |
| 58 | } |
| 59 | |
| 60 | type IssueKind string |
| 61 | |
| 62 | const ( |
| 63 | IssueKindIssue IssueKind = "issue" |
| 64 | IssueKindPr IssueKind = "pr" |
| 65 | ) |
| 66 | |
| 67 | func (e *IssueKind) Scan(src interface{}) error { |
| 68 | switch s := src.(type) { |
| 69 | case []byte: |
| 70 | *e = IssueKind(s) |
| 71 | case string: |
| 72 | *e = IssueKind(s) |
| 73 | default: |
| 74 | return fmt.Errorf("unsupported scan type for IssueKind: %T", src) |
| 75 | } |
| 76 | return nil |
| 77 | } |
| 78 | |
| 79 | type NullIssueKind struct { |
| 80 | IssueKind IssueKind |
| 81 | Valid bool // Valid is true if IssueKind is not NULL |
| 82 | } |
| 83 | |
| 84 | // Scan implements the Scanner interface. |
| 85 | func (ns *NullIssueKind) Scan(value interface{}) error { |
| 86 | if value == nil { |
| 87 | ns.IssueKind, ns.Valid = "", false |
| 88 | return nil |
| 89 | } |
| 90 | ns.Valid = true |
| 91 | return ns.IssueKind.Scan(value) |
| 92 | } |
| 93 | |
| 94 | // Value implements the driver Valuer interface. |
| 95 | func (ns NullIssueKind) Value() (driver.Value, error) { |
| 96 | if !ns.Valid { |
| 97 | return nil, nil |
| 98 | } |
| 99 | return string(ns.IssueKind), nil |
| 100 | } |
| 101 | |
| 102 | type IssueRefSource string |
| 103 | |
| 104 | const ( |
| 105 | IssueRefSourceCommentBody IssueRefSource = "comment_body" |
| 106 | IssueRefSourceIssueBody IssueRefSource = "issue_body" |
| 107 | IssueRefSourceCommitMessage IssueRefSource = "commit_message" |
| 108 | ) |
| 109 | |
| 110 | func (e *IssueRefSource) Scan(src interface{}) error { |
| 111 | switch s := src.(type) { |
| 112 | case []byte: |
| 113 | *e = IssueRefSource(s) |
| 114 | case string: |
| 115 | *e = IssueRefSource(s) |
| 116 | default: |
| 117 | return fmt.Errorf("unsupported scan type for IssueRefSource: %T", src) |
| 118 | } |
| 119 | return nil |
| 120 | } |
| 121 | |
| 122 | type NullIssueRefSource struct { |
| 123 | IssueRefSource IssueRefSource |
| 124 | Valid bool // Valid is true if IssueRefSource is not NULL |
| 125 | } |
| 126 | |
| 127 | // Scan implements the Scanner interface. |
| 128 | func (ns *NullIssueRefSource) Scan(value interface{}) error { |
| 129 | if value == nil { |
| 130 | ns.IssueRefSource, ns.Valid = "", false |
| 131 | return nil |
| 132 | } |
| 133 | ns.Valid = true |
| 134 | return ns.IssueRefSource.Scan(value) |
| 135 | } |
| 136 | |
| 137 | // Value implements the driver Valuer interface. |
| 138 | func (ns NullIssueRefSource) Value() (driver.Value, error) { |
| 139 | if !ns.Valid { |
| 140 | return nil, nil |
| 141 | } |
| 142 | return string(ns.IssueRefSource), nil |
| 143 | } |
| 144 | |
| 145 | type IssueState string |
| 146 | |
| 147 | const ( |
| 148 | IssueStateOpen IssueState = "open" |
| 149 | IssueStateClosed IssueState = "closed" |
| 150 | ) |
| 151 | |
| 152 | func (e *IssueState) Scan(src interface{}) error { |
| 153 | switch s := src.(type) { |
| 154 | case []byte: |
| 155 | *e = IssueState(s) |
| 156 | case string: |
| 157 | *e = IssueState(s) |
| 158 | default: |
| 159 | return fmt.Errorf("unsupported scan type for IssueState: %T", src) |
| 160 | } |
| 161 | return nil |
| 162 | } |
| 163 | |
| 164 | type NullIssueState struct { |
| 165 | IssueState IssueState |
| 166 | Valid bool // Valid is true if IssueState is not NULL |
| 167 | } |
| 168 | |
| 169 | // Scan implements the Scanner interface. |
| 170 | func (ns *NullIssueState) Scan(value interface{}) error { |
| 171 | if value == nil { |
| 172 | ns.IssueState, ns.Valid = "", false |
| 173 | return nil |
| 174 | } |
| 175 | ns.Valid = true |
| 176 | return ns.IssueState.Scan(value) |
| 177 | } |
| 178 | |
| 179 | // Value implements the driver Valuer interface. |
| 180 | func (ns NullIssueState) Value() (driver.Value, error) { |
| 181 | if !ns.Valid { |
| 182 | return nil, nil |
| 183 | } |
| 184 | return string(ns.IssueState), nil |
| 185 | } |
| 186 | |
| 187 | type IssueStateReason string |
| 188 | |
| 189 | const ( |
| 190 | IssueStateReasonCompleted IssueStateReason = "completed" |
| 191 | IssueStateReasonNotPlanned IssueStateReason = "not_planned" |
| 192 | IssueStateReasonReopened IssueStateReason = "reopened" |
| 193 | IssueStateReasonDuplicate IssueStateReason = "duplicate" |
| 194 | ) |
| 195 | |
| 196 | func (e *IssueStateReason) Scan(src interface{}) error { |
| 197 | switch s := src.(type) { |
| 198 | case []byte: |
| 199 | *e = IssueStateReason(s) |
| 200 | case string: |
| 201 | *e = IssueStateReason(s) |
| 202 | default: |
| 203 | return fmt.Errorf("unsupported scan type for IssueStateReason: %T", src) |
| 204 | } |
| 205 | return nil |
| 206 | } |
| 207 | |
| 208 | type NullIssueStateReason struct { |
| 209 | IssueStateReason IssueStateReason |
| 210 | Valid bool // Valid is true if IssueStateReason is not NULL |
| 211 | } |
| 212 | |
| 213 | // Scan implements the Scanner interface. |
| 214 | func (ns *NullIssueStateReason) Scan(value interface{}) error { |
| 215 | if value == nil { |
| 216 | ns.IssueStateReason, ns.Valid = "", false |
| 217 | return nil |
| 218 | } |
| 219 | ns.Valid = true |
| 220 | return ns.IssueStateReason.Scan(value) |
| 221 | } |
| 222 | |
| 223 | // Value implements the driver Valuer interface. |
| 224 | func (ns NullIssueStateReason) Value() (driver.Value, error) { |
| 225 | if !ns.Valid { |
| 226 | return nil, nil |
| 227 | } |
| 228 | return string(ns.IssueStateReason), nil |
| 229 | } |
| 230 | |
| 231 | type MilestoneState string |
| 232 | |
| 233 | const ( |
| 234 | MilestoneStateOpen MilestoneState = "open" |
| 235 | MilestoneStateClosed MilestoneState = "closed" |
| 236 | ) |
| 237 | |
| 238 | func (e *MilestoneState) Scan(src interface{}) error { |
| 239 | switch s := src.(type) { |
| 240 | case []byte: |
| 241 | *e = MilestoneState(s) |
| 242 | case string: |
| 243 | *e = MilestoneState(s) |
| 244 | default: |
| 245 | return fmt.Errorf("unsupported scan type for MilestoneState: %T", src) |
| 246 | } |
| 247 | return nil |
| 248 | } |
| 249 | |
| 250 | type NullMilestoneState struct { |
| 251 | MilestoneState MilestoneState |
| 252 | Valid bool // Valid is true if MilestoneState is not NULL |
| 253 | } |
| 254 | |
| 255 | // Scan implements the Scanner interface. |
| 256 | func (ns *NullMilestoneState) Scan(value interface{}) error { |
| 257 | if value == nil { |
| 258 | ns.MilestoneState, ns.Valid = "", false |
| 259 | return nil |
| 260 | } |
| 261 | ns.Valid = true |
| 262 | return ns.MilestoneState.Scan(value) |
| 263 | } |
| 264 | |
| 265 | // Value implements the driver Valuer interface. |
| 266 | func (ns NullMilestoneState) Value() (driver.Value, error) { |
| 267 | if !ns.Valid { |
| 268 | return nil, nil |
| 269 | } |
| 270 | return string(ns.MilestoneState), nil |
| 271 | } |
| 272 | |
| 273 | type RepoVisibility string |
| 274 | |
| 275 | const ( |
| 276 | RepoVisibilityPublic RepoVisibility = "public" |
| 277 | RepoVisibilityPrivate RepoVisibility = "private" |
| 278 | ) |
| 279 | |
| 280 | func (e *RepoVisibility) Scan(src interface{}) error { |
| 281 | switch s := src.(type) { |
| 282 | case []byte: |
| 283 | *e = RepoVisibility(s) |
| 284 | case string: |
| 285 | *e = RepoVisibility(s) |
| 286 | default: |
| 287 | return fmt.Errorf("unsupported scan type for RepoVisibility: %T", src) |
| 288 | } |
| 289 | return nil |
| 290 | } |
| 291 | |
| 292 | type NullRepoVisibility struct { |
| 293 | RepoVisibility RepoVisibility |
| 294 | Valid bool // Valid is true if RepoVisibility is not NULL |
| 295 | } |
| 296 | |
| 297 | // Scan implements the Scanner interface. |
| 298 | func (ns *NullRepoVisibility) Scan(value interface{}) error { |
| 299 | if value == nil { |
| 300 | ns.RepoVisibility, ns.Valid = "", false |
| 301 | return nil |
| 302 | } |
| 303 | ns.Valid = true |
| 304 | return ns.RepoVisibility.Scan(value) |
| 305 | } |
| 306 | |
| 307 | // Value implements the driver Valuer interface. |
| 308 | func (ns NullRepoVisibility) Value() (driver.Value, error) { |
| 309 | if !ns.Valid { |
| 310 | return nil, nil |
| 311 | } |
| 312 | return string(ns.RepoVisibility), nil |
| 313 | } |
| 314 | |
| 315 | type TransferPrincipalKind string |
| 316 | |
| 317 | const ( |
| 318 | TransferPrincipalKindUser TransferPrincipalKind = "user" |
| 319 | TransferPrincipalKindOrg TransferPrincipalKind = "org" |
| 320 | ) |
| 321 | |
| 322 | func (e *TransferPrincipalKind) Scan(src interface{}) error { |
| 323 | switch s := src.(type) { |
| 324 | case []byte: |
| 325 | *e = TransferPrincipalKind(s) |
| 326 | case string: |
| 327 | *e = TransferPrincipalKind(s) |
| 328 | default: |
| 329 | return fmt.Errorf("unsupported scan type for TransferPrincipalKind: %T", src) |
| 330 | } |
| 331 | return nil |
| 332 | } |
| 333 | |
| 334 | type NullTransferPrincipalKind struct { |
| 335 | TransferPrincipalKind TransferPrincipalKind |
| 336 | Valid bool // Valid is true if TransferPrincipalKind is not NULL |
| 337 | } |
| 338 | |
| 339 | // Scan implements the Scanner interface. |
| 340 | func (ns *NullTransferPrincipalKind) Scan(value interface{}) error { |
| 341 | if value == nil { |
| 342 | ns.TransferPrincipalKind, ns.Valid = "", false |
| 343 | return nil |
| 344 | } |
| 345 | ns.Valid = true |
| 346 | return ns.TransferPrincipalKind.Scan(value) |
| 347 | } |
| 348 | |
| 349 | // Value implements the driver Valuer interface. |
| 350 | func (ns NullTransferPrincipalKind) Value() (driver.Value, error) { |
| 351 | if !ns.Valid { |
| 352 | return nil, nil |
| 353 | } |
| 354 | return string(ns.TransferPrincipalKind), nil |
| 355 | } |
| 356 | |
| 357 | type TransferStatus string |
| 358 | |
| 359 | const ( |
| 360 | TransferStatusPending TransferStatus = "pending" |
| 361 | TransferStatusAccepted TransferStatus = "accepted" |
| 362 | TransferStatusDeclined TransferStatus = "declined" |
| 363 | TransferStatusCanceled TransferStatus = "canceled" |
| 364 | TransferStatusExpired TransferStatus = "expired" |
| 365 | ) |
| 366 | |
| 367 | func (e *TransferStatus) Scan(src interface{}) error { |
| 368 | switch s := src.(type) { |
| 369 | case []byte: |
| 370 | *e = TransferStatus(s) |
| 371 | case string: |
| 372 | *e = TransferStatus(s) |
| 373 | default: |
| 374 | return fmt.Errorf("unsupported scan type for TransferStatus: %T", src) |
| 375 | } |
| 376 | return nil |
| 377 | } |
| 378 | |
| 379 | type NullTransferStatus struct { |
| 380 | TransferStatus TransferStatus |
| 381 | Valid bool // Valid is true if TransferStatus is not NULL |
| 382 | } |
| 383 | |
| 384 | // Scan implements the Scanner interface. |
| 385 | func (ns *NullTransferStatus) Scan(value interface{}) error { |
| 386 | if value == nil { |
| 387 | ns.TransferStatus, ns.Valid = "", false |
| 388 | return nil |
| 389 | } |
| 390 | ns.Valid = true |
| 391 | return ns.TransferStatus.Scan(value) |
| 392 | } |
| 393 | |
| 394 | // Value implements the driver Valuer interface. |
| 395 | func (ns NullTransferStatus) Value() (driver.Value, error) { |
| 396 | if !ns.Valid { |
| 397 | return nil, nil |
| 398 | } |
| 399 | return string(ns.TransferStatus), nil |
| 400 | } |
| 401 | |
| 402 | type AuthAuditLog struct { |
| 403 | ID int64 |
| 404 | ActorID pgtype.Int8 |
| 405 | Action string |
| 406 | TargetType string |
| 407 | TargetID pgtype.Int8 |
| 408 | Meta []byte |
| 409 | CreatedAt pgtype.Timestamptz |
| 410 | } |
| 411 | |
| 412 | type AuthThrottle struct { |
| 413 | ID int64 |
| 414 | Scope string |
| 415 | Identifier string |
| 416 | Hits int32 |
| 417 | WindowStartedAt pgtype.Timestamptz |
| 418 | } |
| 419 | |
| 420 | type BranchProtectionRule struct { |
| 421 | ID int64 |
| 422 | RepoID int64 |
| 423 | Pattern string |
| 424 | PreventForcePush bool |
| 425 | PreventDeletion bool |
| 426 | RequirePrForPush bool |
| 427 | AllowedPusherUserIds []int64 |
| 428 | RequireSignedCommits bool |
| 429 | StatusChecksRequired []string |
| 430 | CreatedAt pgtype.Timestamptz |
| 431 | UpdatedAt pgtype.Timestamptz |
| 432 | CreatedByUserID pgtype.Int8 |
| 433 | } |
| 434 | |
| 435 | type EmailVerification struct { |
| 436 | ID int64 |
| 437 | UserEmailID int64 |
| 438 | TokenHash []byte |
| 439 | ExpiresAt pgtype.Timestamptz |
| 440 | UsedAt pgtype.Timestamptz |
| 441 | CreatedAt pgtype.Timestamptz |
| 442 | } |
| 443 | |
| 444 | type Issue struct { |
| 445 | ID int64 |
| 446 | RepoID int64 |
| 447 | Number int64 |
| 448 | Kind IssueKind |
| 449 | Title string |
| 450 | Body string |
| 451 | BodyHtmlCached pgtype.Text |
| 452 | MdPipelineVersion int32 |
| 453 | AuthorUserID pgtype.Int8 |
| 454 | State IssueState |
| 455 | StateReason NullIssueStateReason |
| 456 | Locked bool |
| 457 | LockReason pgtype.Text |
| 458 | MilestoneID pgtype.Int8 |
| 459 | CreatedAt pgtype.Timestamptz |
| 460 | UpdatedAt pgtype.Timestamptz |
| 461 | EditedAt pgtype.Timestamptz |
| 462 | ClosedAt pgtype.Timestamptz |
| 463 | ClosedByUserID pgtype.Int8 |
| 464 | } |
| 465 | |
| 466 | type IssueAssignee struct { |
| 467 | IssueID int64 |
| 468 | UserID int64 |
| 469 | AssignedAt pgtype.Timestamptz |
| 470 | AssignedByUserID pgtype.Int8 |
| 471 | } |
| 472 | |
| 473 | type IssueComment struct { |
| 474 | ID int64 |
| 475 | IssueID int64 |
| 476 | AuthorUserID pgtype.Int8 |
| 477 | Body string |
| 478 | BodyHtmlCached pgtype.Text |
| 479 | MdPipelineVersion int32 |
| 480 | CreatedAt pgtype.Timestamptz |
| 481 | UpdatedAt pgtype.Timestamptz |
| 482 | EditedAt pgtype.Timestamptz |
| 483 | } |
| 484 | |
| 485 | type IssueEvent struct { |
| 486 | ID int64 |
| 487 | IssueID int64 |
| 488 | ActorUserID pgtype.Int8 |
| 489 | Kind string |
| 490 | Meta []byte |
| 491 | RefTargetID pgtype.Int8 |
| 492 | CreatedAt pgtype.Timestamptz |
| 493 | } |
| 494 | |
| 495 | type IssueLabel struct { |
| 496 | IssueID int64 |
| 497 | LabelID int64 |
| 498 | AppliedAt pgtype.Timestamptz |
| 499 | AppliedByUserID pgtype.Int8 |
| 500 | } |
| 501 | |
| 502 | type IssueReference struct { |
| 503 | ID int64 |
| 504 | SourceIssueID pgtype.Int8 |
| 505 | TargetIssueID int64 |
| 506 | SourceKind IssueRefSource |
| 507 | SourceObjectID pgtype.Int8 |
| 508 | CreatedAt pgtype.Timestamptz |
| 509 | } |
| 510 | |
| 511 | type Job struct { |
| 512 | ID int64 |
| 513 | Kind string |
| 514 | Payload []byte |
| 515 | RunAt pgtype.Timestamptz |
| 516 | Attempts int32 |
| 517 | MaxAttempts int32 |
| 518 | LastError pgtype.Text |
| 519 | LockedBy pgtype.Text |
| 520 | LockedAt pgtype.Timestamptz |
| 521 | CompletedAt pgtype.Timestamptz |
| 522 | FailedAt pgtype.Timestamptz |
| 523 | CreatedAt pgtype.Timestamptz |
| 524 | } |
| 525 | |
| 526 | type Label struct { |
| 527 | ID int64 |
| 528 | RepoID int64 |
| 529 | Name string |
| 530 | Color string |
| 531 | Description string |
| 532 | CreatedAt pgtype.Timestamptz |
| 533 | } |
| 534 | |
| 535 | type Meta struct { |
| 536 | Key string |
| 537 | Value []byte |
| 538 | UpdatedAt pgtype.Timestamptz |
| 539 | } |
| 540 | |
| 541 | type Milestone struct { |
| 542 | ID int64 |
| 543 | RepoID int64 |
| 544 | Title string |
| 545 | Description string |
| 546 | State MilestoneState |
| 547 | DueOn pgtype.Timestamptz |
| 548 | CreatedAt pgtype.Timestamptz |
| 549 | ClosedAt pgtype.Timestamptz |
| 550 | } |
| 551 | |
| 552 | type PasswordReset struct { |
| 553 | ID int64 |
| 554 | UserID int64 |
| 555 | TokenHash []byte |
| 556 | ExpiresAt pgtype.Timestamptz |
| 557 | UsedAt pgtype.Timestamptz |
| 558 | CreatedAt pgtype.Timestamptz |
| 559 | } |
| 560 | |
| 561 | type PushEvent struct { |
| 562 | ID int64 |
| 563 | RepoID int64 |
| 564 | PusherUserID pgtype.Int8 |
| 565 | BeforeSha string |
| 566 | AfterSha string |
| 567 | Ref string |
| 568 | Protocol string |
| 569 | RequestID string |
| 570 | ProcessedAt pgtype.Timestamptz |
| 571 | CreatedAt pgtype.Timestamptz |
| 572 | } |
| 573 | |
| 574 | type Repo struct { |
| 575 | ID int64 |
| 576 | OwnerUserID pgtype.Int8 |
| 577 | OwnerOrgID pgtype.Int8 |
| 578 | Name string |
| 579 | Description string |
| 580 | Visibility RepoVisibility |
| 581 | DefaultBranch string |
| 582 | IsArchived bool |
| 583 | ArchivedAt pgtype.Timestamptz |
| 584 | DeletedAt pgtype.Timestamptz |
| 585 | DiskUsedBytes int64 |
| 586 | ForkOfRepoID pgtype.Int8 |
| 587 | LicenseKey pgtype.Text |
| 588 | PrimaryLanguage pgtype.Text |
| 589 | HasIssues bool |
| 590 | HasPulls bool |
| 591 | CreatedAt pgtype.Timestamptz |
| 592 | UpdatedAt pgtype.Timestamptz |
| 593 | DefaultBranchOid pgtype.Text |
| 594 | } |
| 595 | |
| 596 | type RepoCollaborator struct { |
| 597 | RepoID int64 |
| 598 | UserID int64 |
| 599 | Role CollabRole |
| 600 | AddedAt pgtype.Timestamptz |
| 601 | AddedByUserID pgtype.Int8 |
| 602 | } |
| 603 | |
| 604 | type RepoIssueCounter struct { |
| 605 | RepoID int64 |
| 606 | NextNumber int64 |
| 607 | } |
| 608 | |
| 609 | type RepoRedirect struct { |
| 610 | OldOwnerUserID pgtype.Int8 |
| 611 | OldOwnerOrgID pgtype.Int8 |
| 612 | OldName string |
| 613 | RepoID int64 |
| 614 | RedirectedAt pgtype.Timestamptz |
| 615 | } |
| 616 | |
| 617 | type RepoTransferRequest struct { |
| 618 | ID int64 |
| 619 | RepoID int64 |
| 620 | FromUserID int64 |
| 621 | ToPrincipalKind TransferPrincipalKind |
| 622 | ToPrincipalID int64 |
| 623 | CreatedBy int64 |
| 624 | CreatedAt pgtype.Timestamptz |
| 625 | ExpiresAt pgtype.Timestamptz |
| 626 | Status TransferStatus |
| 627 | AcceptedAt pgtype.Timestamptz |
| 628 | DeclinedAt pgtype.Timestamptz |
| 629 | CanceledAt pgtype.Timestamptz |
| 630 | } |
| 631 | |
| 632 | type User struct { |
| 633 | ID int64 |
| 634 | Username string |
| 635 | DisplayName string |
| 636 | PrimaryEmailID pgtype.Int8 |
| 637 | PasswordHash string |
| 638 | PasswordAlgo string |
| 639 | PasswordUpdatedAt pgtype.Timestamptz |
| 640 | EmailVerified bool |
| 641 | LastLoginAt pgtype.Timestamptz |
| 642 | SuspendedAt pgtype.Timestamptz |
| 643 | SuspendedReason pgtype.Text |
| 644 | DeletedAt pgtype.Timestamptz |
| 645 | CreatedAt pgtype.Timestamptz |
| 646 | UpdatedAt pgtype.Timestamptz |
| 647 | Bio string |
| 648 | Location string |
| 649 | Website string |
| 650 | Company string |
| 651 | Pronouns string |
| 652 | AvatarObjectKey pgtype.Text |
| 653 | Theme string |
| 654 | SessionEpoch int32 |
| 655 | } |
| 656 | |
| 657 | type UserEmail struct { |
| 658 | ID int64 |
| 659 | UserID int64 |
| 660 | Email string |
| 661 | IsPrimary bool |
| 662 | Verified bool |
| 663 | VerificationTokenHash []byte |
| 664 | VerificationSentAt pgtype.Timestamptz |
| 665 | VerifiedAt pgtype.Timestamptz |
| 666 | CreatedAt pgtype.Timestamptz |
| 667 | } |
| 668 | |
| 669 | type UserNotificationPref struct { |
| 670 | UserID int64 |
| 671 | Key string |
| 672 | Value []byte |
| 673 | UpdatedAt pgtype.Timestamptz |
| 674 | } |
| 675 | |
| 676 | type UserRecoveryCode struct { |
| 677 | ID int64 |
| 678 | UserID int64 |
| 679 | CodeHash []byte |
| 680 | UsedAt pgtype.Timestamptz |
| 681 | GeneratedAt pgtype.Timestamptz |
| 682 | CreatedAt pgtype.Timestamptz |
| 683 | } |
| 684 | |
| 685 | type UserSshKey struct { |
| 686 | ID int64 |
| 687 | UserID int64 |
| 688 | Title string |
| 689 | FingerprintSha256 string |
| 690 | KeyType string |
| 691 | KeyBits int32 |
| 692 | PublicKey string |
| 693 | LastUsedAt pgtype.Timestamptz |
| 694 | LastUsedIp *netip.Addr |
| 695 | CreatedAt pgtype.Timestamptz |
| 696 | } |
| 697 | |
| 698 | type UserToken struct { |
| 699 | ID int64 |
| 700 | UserID int64 |
| 701 | Name string |
| 702 | TokenHash []byte |
| 703 | TokenPrefix string |
| 704 | Scopes []string |
| 705 | ExpiresAt pgtype.Timestamptz |
| 706 | LastUsedAt pgtype.Timestamptz |
| 707 | LastUsedIp *netip.Addr |
| 708 | RevokedAt pgtype.Timestamptz |
| 709 | CreatedAt pgtype.Timestamptz |
| 710 | } |
| 711 | |
| 712 | type UserTotp struct { |
| 713 | ID int64 |
| 714 | UserID int64 |
| 715 | SecretEncrypted []byte |
| 716 | SecretNonce []byte |
| 717 | ConfirmedAt pgtype.Timestamptz |
| 718 | LastUsedCounter int64 |
| 719 | CreatedAt pgtype.Timestamptz |
| 720 | UpdatedAt pgtype.Timestamptz |
| 721 | } |
| 722 | |
| 723 | type UsernameRedirect struct { |
| 724 | OldUsername string |
| 725 | UserID int64 |
| 726 | ChangedAt pgtype.Timestamptz |
| 727 | } |
| 728 | |
| 729 | type WebhookEventsPending struct { |
| 730 | ID int64 |
| 731 | RepoID int64 |
| 732 | EventKind string |
| 733 | Payload []byte |
| 734 | CreatedAt pgtype.Timestamptz |
| 735 | } |
| 736 |