Captain License Entities
Entities for tracking captain's licenses, renewals, and renewal events.
CaptainLicense
Purpose: User's captain's license.
Key Fields:
Id(int): Unique identifierUserId: License holderLicenseNumber: License numberLicenseType: License type/levelIssuingAuthority: USCG, State, InternationalIssueDate: Issue dateExpirationDate: Expiration dateStatus: Active, Expired, Suspended, etc.RequiresClassRenewal: Whether requires class renewalRequiresTestRenewal: Whether requires test renewalRequiresMedicalExam: Whether requires medical examRequiresDrugTest: Whether requires drug testIsVerified: Whether license is verified
Relationships:
- Many-to-one: User
- One-to-many: LicenseRenewalHistory
Usage Patterns:
// Create license
var license = new CaptainLicense
{{
UserId = userId,
LicenseNumber = "USCG-12345",
LicenseType = "6-Pack",
IssuingAuthority = "USCG",
IssueDate = issueDate,
ExpirationDate = expirationDate,
Status = LicenseStatus.Active
}};
// Get expiring licenses
var expiring = context.CaptainLicenses
.Where(cl => cl.ExpirationDate <= DateTime.UtcNow.AddDays(90) && cl.Status == LicenseStatus.Active)
.Include(cl => cl.User)
.ToList();
LicenseRenewalEvent
Purpose: License renewal event (class, test, exam).
Key Fields:
Id(int): Unique identifierEventName: Event nameEventDescription: Event descriptionEventType: Class, Test, Exam, Medical, DrugTestOrganizerName: Organizer nameOrganizerEmail,OrganizerPhone: Contact informationLocationName: Event locationAddress,City,State,ZipCode: AddressLatitude,Longitude: CoordinatesEventDate: Event dateStartTime,EndTime: Event timesRegistrationFee: Registration feeMaxParticipants: Maximum participantsLicenseTypesCovered: License types coveredIsActive: Whether event is active
Relationships:
- One-to-many: LicenseRenewalEventRegistration
LicenseRenewalEventRegistration
Purpose: User registration for a renewal event.
Key Fields:
Id(int): Unique identifierLicenseRenewalEventId: Associated eventUserId: Registered userCaptainLicenseId: Associated licenseRegistrationDate: Registration dateStatus: Pending, Confirmed, Completed, CancelledPaymentStatus: Payment statusAttended: Whether user attendedPassed: Whether user passed (for tests)CertificateUrl: Certificate URL (if applicable)
Relationships:
- Many-to-one: LicenseRenewalEvent, User, CaptainLicense
LicenseRenewalHistory
Purpose: History of license renewals.
Key Fields:
Id(int): Unique identifierCaptainLicenseId: Associated licenseRenewalDate: Renewal dateRenewalMethod: Class, Exam, Online, etc.RenewalEventId: Associated renewal event (optional)RequirementsMet: Requirements met (JSON)DocumentationUrl: Documentation URLNotes: Renewal notes
Relationships:
- Many-to-one: CaptainLicense, LicenseRenewalEvent (optional)
Related Documentation
- Captain License System - Complete license system documentation
- Charter System - Charter captain management
- Events System - General event system