mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 10:43:13 +00:00
- VendorAccessToken model + unique-index migration; TokenLifetimeDays config - VendorPortalTokenService: CSPRNG token generation, rotation, revocation - VendorPortalController: public portal API guarded by X-Vendor-Token header; dispatches list/detail, accept, vendor status transitions, cancel request, checklist updates, signoffs (vendor + customer), comments with dispatcher attribution via AspNetUsers join - VendorController: portal-token admin endpoints (get / rotate / revoke) - WorkOrderController: dispatch email now uses vendor portal URL and HTML-encodes user fields; AddDispatchComment now stores CommentType='dispatcher' with the SHOC user's name so portal can attribute the author - DispatchPublicController: deprecated per-dispatch GET accept flow returns a static 'link no longer active' page (no state mutation)
21 lines
631 B
C#
21 lines
631 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Data.SeaHavenIndustries
|
|
{
|
|
public class VendorAccessToken : FullAuditEntity
|
|
{
|
|
public int VendorId { get; set; }
|
|
[ForeignKey(nameof(VendorId))]
|
|
public virtual Vendor? Vendor { get; set; }
|
|
|
|
[Required]
|
|
[MaxLength(64)]
|
|
public string Token { get; set; } = string.Empty;
|
|
|
|
public DateTime IssuedAt { get; set; }
|
|
public DateTime ExpiresAt { get; set; }
|
|
public DateTime? RevokedAt { get; set; }
|
|
public DateTime? LastUsedAt { get; set; }
|
|
}
|
|
}
|