License model — CRUD, DLID generation, validation logic #618
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 1.2 — License Model
Parent: #616 | Depends on: #617 | Blocks: #621, #622, #623
Files to create
models/licensing/license.go:CreateLicense(userID, tier) -> License— generates 32-char hex DLID with CRC32 checksum in last 4 charsGetLicenseByDLID(dlid) -> License— primary lookup methodGetLicensesByUser(userID) -> []License— user dashboardUpdateLicenseTier(licenseID, newTier)— tier upgrade/downgrade, auto-recalculate entitlementsRevokeLicense(licenseID)/SuspendLicense/ReactivateLicenseIsExpired(license) -> bool— check expiryValidateDLID(dlid) -> bool— format check (hex + CRC32) without database hitDLID Format
a1b2c3d4-e5f6a7b8-c9d0e1f2-CHECKSUMcrypto/randfor uniquenessAcceptance criteria