Simple vehicle model
This commit is contained in:
parent
7123b24665
commit
96ee51f006
@ -69,6 +69,8 @@
|
||||
7A971F2126ADC351007E527B /* ApiError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A971F1F26ADC351007E527B /* ApiError.swift */; };
|
||||
7A971F2326ADF74B007E527B /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A971F2226ADF74B007E527B /* MainView.swift */; };
|
||||
7A971F2426ADF74B007E527B /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A971F2226ADF74B007E527B /* MainView.swift */; };
|
||||
7ABC05A826B05AF9004BB5A7 /* Vehicle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ABC05A726B05AF9004BB5A7 /* Vehicle.swift */; };
|
||||
7ABC05A926B05AF9004BB5A7 /* Vehicle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ABC05A726B05AF9004BB5A7 /* Vehicle.swift */; };
|
||||
7ACD05D72695C08A00557667 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ACD05D62695C08A00557667 /* Constants.swift */; };
|
||||
7ACD05D82695C08A00557667 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ACD05D62695C08A00557667 /* Constants.swift */; };
|
||||
7AEFAEED26985A3400ED2C85 /* ACProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AEFAEEC26985A3400ED2C85 /* ACProgressView.swift */; };
|
||||
@ -165,6 +167,7 @@
|
||||
7A971F1F26ADC351007E527B /* ApiError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiError.swift; sourceTree = "<group>"; };
|
||||
7A971F2226ADF74B007E527B /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = "<group>"; };
|
||||
7A971F2526ADFD35007E527B /* AutoCat2 (macOS).entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "AutoCat2 (macOS).entitlements"; sourceTree = "<group>"; };
|
||||
7ABC05A726B05AF9004BB5A7 /* Vehicle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Vehicle.swift; sourceTree = "<group>"; };
|
||||
7ACD05D62695C08A00557667 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
|
||||
7AEFAEEC26985A3400ED2C85 /* ACProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ACProgressView.swift; sourceTree = "<group>"; };
|
||||
7AF552D82696E5C100578083 /* ApiTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiTests.swift; sourceTree = "<group>"; };
|
||||
@ -281,6 +284,7 @@
|
||||
7A40D5E026924AEC009B0BC4 /* User.swift */,
|
||||
7A40D5E226924B09009B0BC4 /* Settings.swift */,
|
||||
7A683998269612EA00B2188A /* Response.swift */,
|
||||
7ABC05A726B05AF9004BB5A7 /* Vehicle.swift */,
|
||||
);
|
||||
path = Models;
|
||||
sourceTree = "<group>";
|
||||
@ -615,6 +619,7 @@
|
||||
7A2329CB26AF15AC00264CFA /* ReportView.swift in Sources */,
|
||||
7A40D5ED2693A1EA009B0BC4 /* AuthVM.swift in Sources */,
|
||||
7A40D59E2691C6D8009B0BC4 /* AutoCat2.xcdatamodeld in Sources */,
|
||||
7ABC05A826B05AF9004BB5A7 /* Vehicle.swift in Sources */,
|
||||
7A2329B926AF122400264CFA /* MainViewSmall.swift in Sources */,
|
||||
7A2329C826AF143F00264CFA /* RecordsView.swift in Sources */,
|
||||
7A40D5E126924AEC009B0BC4 /* User.swift in Sources */,
|
||||
@ -650,6 +655,7 @@
|
||||
7A2329CC26AF15AC00264CFA /* ReportView.swift in Sources */,
|
||||
7A40D5EE2693A1EA009B0BC4 /* AuthVM.swift in Sources */,
|
||||
7A40D59F2691C6D8009B0BC4 /* AutoCat2.xcdatamodeld in Sources */,
|
||||
7ABC05A926B05AF9004BB5A7 /* Vehicle.swift in Sources */,
|
||||
7A2329BA26AF122400264CFA /* MainViewSmall.swift in Sources */,
|
||||
7A2329C926AF143F00264CFA /* RecordsView.swift in Sources */,
|
||||
7A40D5A32691C6D8009B0BC4 /* ContentView.swift in Sources */,
|
||||
|
||||
@ -7,12 +7,12 @@
|
||||
<key>AutoCat2 (iOS).xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>AutoCat2 (macOS).xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>AutoCatCore.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1" systemVersion="11A491" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithCloudKit="true" userDefinedModelVersionIdentifier="">
|
||||
<entity name="Item" representedClassName="Item" syncable="YES" codeGenerationType="class">
|
||||
<attribute name="timestamp" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
|
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="19178.1" systemVersion="20F71" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithCloudKit="YES" userDefinedModelVersionIdentifier="">
|
||||
<entity name="Vehicle" representedClassName="Vehicle" syncable="YES" codeGenerationType="class">
|
||||
<attribute name="number" optional="YES" attributeType="String"/>
|
||||
</entity>
|
||||
<elements>
|
||||
<element name="Item" positionX="-63" positionY="-18" width="128" height="44"/>
|
||||
<element name="Vehicle" positionX="-54" positionY="-9" width="128" height="44"/>
|
||||
</elements>
|
||||
</model>
|
||||
7
Shared/Models/Vehicle.swift
Normal file
7
Shared/Models/Vehicle.swift
Normal file
@ -0,0 +1,7 @@
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
@objc(Vehicle)
|
||||
public class Vehicle: NSManagedObject {
|
||||
@NSManaged public var number: String?
|
||||
}
|
||||
@ -1,8 +1,18 @@
|
||||
import SwiftUI
|
||||
|
||||
struct CheckView: View {
|
||||
@State private var number: String = ""
|
||||
|
||||
var body: some View {
|
||||
Text("Check view")
|
||||
VStack(alignment: .center, spacing: 16) {
|
||||
TextField("", text: $number)
|
||||
Button("Check") {
|
||||
|
||||
}
|
||||
// List(["one", "two", "three"]) { item in
|
||||
// Text(item)
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user