A community based topic aggregation platform built on atproto
1package users 2 3import ( 4 "time" 5) 6 7// User represents an atProto user tracked in the Coves AppView 8// This is NOT the user's repository - that lives in the PDS 9// This table only tracks metadata for efficient AppView queries 10type User struct { 11 CreatedAt time.Time `json:"createdAt" db:"created_at"` 12 UpdatedAt time.Time `json:"updatedAt" db:"updated_at"` 13 DID string `json:"did" db:"did"` 14 Handle string `json:"handle" db:"handle"` 15 PDSURL string `json:"pdsUrl" db:"pds_url"` 16} 17 18// CreateUserRequest represents the input for creating a new user 19type CreateUserRequest struct { 20 DID string `json:"did"` 21 Handle string `json:"handle"` 22 PDSURL string `json:"pdsUrl"` // User's PDS host URL 23} 24 25// RegisterAccountRequest represents the input for registering a new account on the PDS 26type RegisterAccountRequest struct { 27 Handle string `json:"handle"` 28 Email string `json:"email"` 29 Password string `json:"password"` 30 InviteCode string `json:"inviteCode,omitempty"` 31} 32 33// RegisterAccountResponse represents the response from PDS account creation 34type RegisterAccountResponse struct { 35 DID string `json:"did"` 36 Handle string `json:"handle"` 37 AccessJwt string `json:"accessJwt"` 38 RefreshJwt string `json:"refreshJwt"` 39 PDSURL string `json:"pdsUrl"` 40}