feat(server): admin 批次列表/作废改指 codes 库新表,清理被取代的旧 store 方法(#codes-lib)
This commit is contained in:
@@ -43,21 +43,12 @@ const (
|
||||
|
||||
// SubscriptionRow mirrors the `subscriptions` DB row.
|
||||
type SubscriptionRow struct {
|
||||
ID int64
|
||||
UserID int64
|
||||
PlanID int64
|
||||
PlanCode PlanCode
|
||||
ExpiresAt time.Time
|
||||
Source string
|
||||
}
|
||||
|
||||
// BatchRow mirrors the `code_batches` DB row.
|
||||
type BatchRow struct {
|
||||
ID int64
|
||||
Channel BatchChannel
|
||||
CreatedBy string
|
||||
Note sql.NullString
|
||||
CreatedAt time.Time
|
||||
UserID int64
|
||||
PlanID int64
|
||||
PlanCode PlanCode
|
||||
ExpiresAt time.Time
|
||||
Source string
|
||||
}
|
||||
|
||||
// Store wraps a *sql.DB and exposes all database operations needed by the
|
||||
@@ -248,4 +239,3 @@ func (s *Store) MintOne(ctx context.Context, codeHash string, ent libcodes.Entit
|
||||
func (s *Store) BeginTx(ctx context.Context) (*sql.Tx, error) {
|
||||
return s.db.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelReadCommitted})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user