Rename; Added EMS server; redis compose

This commit is contained in:
cracklesparkle
2024-08-20 17:34:21 +09:00
parent 61339f4c26
commit 97b44a4db7
85 changed files with 2832 additions and 188 deletions

View File

@ -0,0 +1,39 @@
export interface User {
id: number;
}
export interface UserData extends User {
email: string;
login: string;
phone: string;
name: string;
surname: string;
is_active: boolean;
role_id: number;
}
export interface UserCreds extends User {
password: string;
}
export interface AuthState {
isAuthenticated: boolean;
token: string | null;
userData: UserData | null;
}
export interface LoginFormData {
username: string;
password: string;
grant_type: string;
scope?: string;
client_id?: string;
client_secret?: string;
}
export interface ApiResponse {
access_token: string;
data: JSON;
status: number;
statusText: string;
}

View File

@ -0,0 +1,35 @@
import { Validate } from "react-hook-form";
export interface CreateFieldTypes {
string: 'string';
number: 'number';
date: 'date';
dateTime: 'dateTime';
boolean: 'boolean';
singleSelect: 'singleSelect';
actions: 'actions';
custom: 'custom';
}
export interface InputTypes {
password: 'password';
}
export type CreateFieldType = CreateFieldTypes[keyof CreateFieldTypes]
export type InputType = InputTypes[keyof InputTypes]
export interface CreateField {
key: string;
headerName?: string;
type: CreateFieldType;
required?: boolean;
defaultValue?: any;
inputType?: InputType;
validate?: Validate<string, boolean>;
/** Watch for field */
watch?: string;
/** Message on watch */
watchMessage?: string;
/** Should field be included in the request */
include?: boolean;
}

View File

@ -0,0 +1,65 @@
// owner_id relates to other companies
export interface ICompany {
name: string;
fullname: string;
description: string;
owner_id: number;
}
export interface IDepartment {
name: string;
fullname: string;
description: string;
company_id: number;
owner_id: number;
}
export interface IDocumentFolder {
id: number;
name: string;
description: string;
create_date: string;
}
export interface IDocument {
id: number;
document_folder_id: number,
name: string;
description: string;
department_id: number;
create_date: string;
}
export interface IBank {
name: string;
bik: string;
corschet: string;
activ: boolean;
id_1c: string;
}
export interface IOrganization {
full_name: string;
name: string;
inn: string;
ogrn: string;
kpp: string;
okopf: string;
legal_address: string;
actual_address: string;
mail_address: string;
id_budget: number;
fio_dir: string;
phone: string;
email: string;
comment: string;
id_bank: string;
id_1c: string;
active: boolean;
}
export interface IOrganizationBank {
id_organization: string;
id_banks: string;
rasch_schet: string;
}

View File

@ -0,0 +1,18 @@
export interface IRegion {
id: number;
name: string;
}
export interface ICity {
id: number;
name: string;
}
export interface IBoiler {
id: string;
id_object: string;
boiler_name: string;
boiler_code: string;
id_city: number;
activity: boolean;
}

View File

@ -0,0 +1,3 @@
export interface PreferencesState {
darkMode: boolean;
}

View File

@ -0,0 +1,10 @@
export interface IRole {
name: string;
description?: string | null;
id: number;
}
export interface IRoleCreate {
name: string;
description?: string | null;
}

View File

@ -0,0 +1,33 @@
export interface IServer {
id: number;
name: string;
region_id: number;
}
export interface IServersInfo extends IServer {
servers_count: number;
IPs_count: number;
status: string;
}
export interface IServerIP {
name: string;
is_actual: boolean;
ip: string;
server_id: number;
}
export interface IHardware {
name: string;
os_info: string;
ram: string;
processor: string;
server_id: number;
}
export interface IStorage {
name: string;
size: string;
storage_type: string;
hardware_id: number;
}

View File

@ -0,0 +1,10 @@
export interface IUser {
id: number;
password: string;
email: string;
login: string;
phone: string;
name: string;
surname: string;
is_active: boolean;
}