Import DB types

This commit is contained in:
2025-07-17 18:03:30 -07:00
parent 62c4dcac96
commit edbf8516b7
9 changed files with 153 additions and 39 deletions
+7 -9
View File
@@ -1,15 +1,13 @@
import { WebSiteData } from "./WebsiteData";
export class Account { export class Account {
public id: number = -1; public id: number = 0;
public userName: string = ""; public userName: string = "";
public email: string = ""; public email: string = "";
public emailVerified: boolean = false; public emailVerified: boolean = false;
public passwordHash: string = ""; public passwordHash: string = "";
public siteData: WebSiteData = new WebSiteData(); public failedPasswordLock: boolean = false;
public error: string = ""; public passwordAttempts: number = 5;
public currentPasswordAttempts: number = 0;
constructor(init?: Partial<Account>) { public role: string = "Generic";
Object.assign(this, init); public emailToken: string = "";
} public dataServer: string = "";
} }
+20
View File
@@ -0,0 +1,20 @@
export class Company {
public id: number = 0;
public name: string = "";
public email: string = "";
public emailVerified: boolean = false;
public websiteURL: string = "";
public logoURL: string = "";
public phone: string = "";
public postalCode: string = "";
public country: string = ""; // 2 Letter Country Code
public stateOrRegion: string = "";
public city: string = "";
public description: string = "";
}
export class Employee {
public id: number = 0;
public accountID: number = 0;
public companyID: number = 0;
}
+17
View File
@@ -0,0 +1,17 @@
export class WebSiteData {
public id: number = 0;
public companyID: number = 0;
public title: string = "";
public postalCode: string = "";
public country: string = "";
public stateOrRegion: string = "";
public city: string = "";
public salaryMin: number = 0;
public salaryMax: number = 0;
public jobType: string = "";
public remote: boolean = false;
public description: string = "";
public createdTime: Date = new Date();
public modifiedTime: Date = new Date();
public isDeleted: boolean = false;
}
-15
View File
@@ -1,15 +0,0 @@
export class Product {
public id: number = -1;
public name: string = "";
public description: string = "";
public curShowingIMG: number = 0;
public images: ProductImage[] = [];
public cost: number = 0;
public url: string = "";
}
export class ProductImage {
imageID: number = 0;
productID: number = 0;
imageSrc: string = "";
}
+106
View File
@@ -0,0 +1,106 @@
export class Resume {
public id: number = 0;
public accountID: number = 0;
public name: string = "";
public field: string = "";
public email: string = "";
public phoneNumber: string = "";
public postalCode: string = "";
public country: string = "";
public stateOrRegion: string = "";
public city: string = "";
public isActive: boolean = false;
public experience: ResumeExperience[] = [];
public military: ResumeMilitary = [];
public education: ResumeEducation[] = [];
public skills: ResumeSkill[] = [];
public languages: ResumeLanguage[] = [];
public certification: ResumeCertification[] = [];
public projects: ResumeProject[] = [];
}
export class ResumeExperience {
id: number = 0;
resumeID: number = 0;
jobTitle: string = "";
company: string = "";
postalCode: string = "";
country: string = "";
stateOrRegion: string = "";
city: string = "";
dateStarted: Date = new Date();
stillEmployed: boolean = false;
dateEnded: Date = new Date();
experienceBullets: ResumeExperienceBullet[] = [];
}
export class ResumeExperienceBullet {
id: number = 0;
resumeID: number = 0;
resumeExperienceID: number = 0;
jobFunction: string = "";
}
export class ResumeMilitary {
id: number = 0;
resumeID: number = 0;
country: string = "";
rank: string = "";
dateStarted: Date = new Date();
stillServing: boolean = false;
dateEnded: Date = new Date();
millitaryBullets: ResumeMilitaryBullet[] = [];
}
export class ResumeMilitaryBullet {
id: number = 0;
resumeID: number = 0;
resumeMilitaryID: number = 0;
achievement: string = "";
description: string = "";
}
export class ResumeEducation {
id: number = 0;
resumeID: number = 0;
degreeType: string = "";
degreeField: string = "";
school: string = "";
postalCode: string = "";
country: string = "";
stateOrRegion: string = "";
city: string = "";
dateStarted: Date = new Date();
stillStudying: boolean = false;
dateEnded: Date = new Date();
}
export class ResumeSkill {
id: number = 0; // PK
resumeID: number = 0; // FK
name: string = "";
description: string = "";
}
export class ResumeLanguage {
id: number = 0;
resumeID: number = 0;
language: string = "";
proficiency: string = "";
}
export class ResumeCertification {
id: number = 0;
resumeID: number = 0;
name: string = "";
verificationURL: string = "";
description: string = "";
}
export class ResumeProject {
id: number = 0;
resumeID: number = 0;
name: string = "";
url: string = "";
description: string = "";
}
-12
View File
@@ -1,12 +0,0 @@
export class WebSiteData {
public accountID: number = -1;
public failedPasswordLock: boolean = false;
public passwordAttempts: number = 5;
public currentPasswordAttempts: number = 0;
public role: string = "Generic";
public emailToken: string = "";
constructor(init?: Partial<WebSiteData>) {
Object.assign(this, init);
}
}
@@ -5,7 +5,7 @@ import { Router, ActivatedRoute } from '@angular/router';
import { Title } from '@angular/platform-browser'; import { Title } from '@angular/platform-browser';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { Authentication } from '../../../../services/Authentication'; import { Authentication } from '../../../../services/Authentication';
import { Product } from 'app/models/Product'; import { Product } from 'app/models/Company';
@Component({ @Component({
selector: 'item-edit', selector: 'item-edit',
@@ -5,7 +5,7 @@ import { Router, ActivatedRoute } from '@angular/router';
import { Title } from '@angular/platform-browser'; import { Title } from '@angular/platform-browser';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { Authentication } from '../../../../services/Authentication'; import { Authentication } from '../../../../services/Authentication';
import { Product } from 'app/models/Product'; import { Product } from 'app/models/Company';
@Component({ @Component({
selector: 'item-new', selector: 'item-new',
@@ -5,7 +5,7 @@ import { Router, ActivatedRoute, RouterModule } from '@angular/router';
import { Title } from '@angular/platform-browser'; import { Title } from '@angular/platform-browser';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { Authentication } from '../../../services/Authentication'; import { Authentication } from '../../../services/Authentication';
import { Product } from 'app/models/Product'; import { Product } from 'app/models/Company';
@Component({ @Component({
selector: 'store-catalog', selector: 'store-catalog',