Initial commit: Car Maintenance Management System

Author: Yang Lu

School: Liaoning Institute of Science and Technology

Major: Computer Science and Technology

Class: BZ246

Tech Stack:

- Backend: Spring Boot 2.7.18 + JPA + MySQL

- Frontend: HTML5 + CSS3 + JavaScript

Features:

- User Management (Admin/Staff/Customer roles)

- Vehicle Archive Management

- Service Order Management

- Parts Inventory Management

- Online Appointment Service

- Data Statistics and Analysis

Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
wangziqi
2026-01-07 14:28:50 +08:00
commit cfae122685
45 changed files with 5447 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
package com.carmaintenance.entity;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 车辆档案实体
*/
@Data
@Entity
@Table(name = "vehicles")
@EntityListeners(AuditingEntityListener.class)
public class Vehicle {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "vehicle_id")
private Integer vehicleId;
@Column(name = "customer_id", nullable = false)
private Integer customerId;
@Column(name = "license_plate", nullable = false, unique = true, length = 20)
private String licensePlate;
@Column(name = "brand", nullable = false, length = 50)
private String brand;
@Column(name = "model", nullable = false, length = 50)
private String model;
@Column(name = "color", length = 20)
private String color;
@Column(name = "vin", unique = true, length = 17)
private String vin;
@Column(name = "engine_no", length = 50)
private String engineNo;
@Column(name = "purchase_date")
private LocalDate purchaseDate;
@Column(name = "mileage", precision = 10, scale = 2)
private BigDecimal mileage = BigDecimal.ZERO;
@Column(name = "last_maintenance_date")
private LocalDate lastMaintenanceDate;
@Column(name = "next_maintenance_date")
private LocalDate nextMaintenanceDate;
@Enumerated(EnumType.STRING)
@Column(name = "status")
private VehicleStatus status = VehicleStatus.normal;
@CreatedDate
@Column(name = "create_time", updatable = false)
private LocalDateTime createTime;
@LastModifiedDate
@Column(name = "update_time")
private LocalDateTime updateTime;
public enum VehicleStatus {
normal, in_service, completed
}
}