mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 08:23:12 +00:00
- Extend Locations model with Address, City, State, ZipCode, Phone, Contact, ContactEmail, Status, AccountId
- Update Location DTOs to match new fields
- Create LocationController with paged list, get by ID, create, update, delete
- Support both REST-style routes (/api/Location/{id}) and legacy query routes (/api/Location/DeleteLocation?id=)
- Add migration for new Location columns
27 lines
1,014 B
C#
27 lines
1,014 B
C#
using System;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using static System.Runtime.InteropServices.JavaScript.JSType;
|
|
|
|
namespace Data.SeaHavenIndustries
|
|
{
|
|
public class Locations : FullAuditEntity
|
|
{
|
|
public string? Title { get; set; }
|
|
public string? Name { get; set; }
|
|
public string? Address { get; set; }
|
|
public string? City { get; set; }
|
|
public string? State { get; set; }
|
|
public string? ZipCode { get; set; }
|
|
public string? Phone { get; set; }
|
|
public string? Contact { get; set; }
|
|
public string? ContactEmail { get; set; }
|
|
public string? Status { get; set; }
|
|
public string? Latitude { get; set; }
|
|
public string? Longitude { get; set; }
|
|
public int? AccountId { get; set; }
|
|
[ForeignKey("AccountId")]
|
|
public Accounts? Account { get; set; }
|
|
public ICollection<Template>? Templates { get; set; }
|
|
public ICollection<WorkOrder>? workOrders { get; set; }
|
|
}
|
|
}
|