GithubHelp home page GithubHelp logo

mitasco-backend's People

Contributors

mathi123 avatar

Watchers

 avatar  avatar

mitasco-backend's Issues

core: countries

Countries

Description

Countries used in addresses.

Tables

Country

Name: Country
Columns:

  • id
  • code: nvarchar(2)
  • description: nvarchar(150)

Constraints:

  • code is unique

Country translations

Name: CountryTranslation
Columns:

  • id
  • languageId: FK language.id, CASCADE
  • countryId: FK Country.id, CASCADE
  • translation: nvarchar(150)

core: units

Units

Description

Units of measure, representing reality. e.g. m, m2, m3, ... units of measure can be converted in each other if in the same dimension (time, weight, ...)

Tables

Physical dimensions

Types of dimensions, used for automatic conversions.

Name: Dimension
Columns:

  • id
  • code: nvarchar(15)
  • description: nvarchar(150)

Units

Actual units, converted to each other using the dimensions base unit. e.g. Ton -> Kilo

Name: Unit
Columns:

  • id
  • dimensionId: FK Dimension.id, CASCADE
  • code: nvarchar(15)
  • description: nvarchar(150)
  • isBaseUnit: bool
  • conversionToBaseUnit: float, conversion rate to the base unit, unit = conversionRate * baseUnit.

Constraints:

  • dimensionId x isBaseUnit should be unique

Dimension translations

Name: DimensionTranslation
Columns:

  • id
  • dimensionId: FK Dimension.id, CASCADE
  • translation: nvarchar(150)

Unit translations

Name: UnitTranslation
Columns:

  • id
  • unitId: FK Unit.id, CASCADE
  • translation: nvarchar(150)

API

Permissions

  • All users can view all units
  • DataAdministration permission is required to edit, add or delete units or dimensions.

Analyse overview

Basistabellen [core]

The core module contains all the basic functionality.

  • roles (#4)
  • permissions (#5)
  • users (#6)
  • units (#7)
  • system parameters (#8)
  • logs (#9)
  • salutation (#10)
  • landen (#11)
  • talen (#12)

Sales

Sales module contains all sales related functionality.

  • company
  • person
  • project
  • projectStadium
  • projectRole
  • projectType
  • projectSubType
  • projectSourceType
  • projectSourceSubType
  • projectTag
  • projectNote

Calculation

  • article
  • mountingTeam
  • material
  • element
  • category
  • subCategory
  • calculation
  • calculationParameter
  • offerText
  • calculationElement
  • calculationBlock
  • calculationSubBlock

core: roles

Role

Description

Defines application user roles. User roles are assigned to users.

Table(s)

Role

Name: Role
Columns:

  • id
  • code: nvarchar(16)
  • description: nvarchar(512)
  • canDelete: bool, indicates if this role is a fix system role, if so, it cannot be deleted.

Constraints:

  • code is unique

Translations

name: RoleTranslation
Columns

  • id
  • roleId: FK role.id, CASCADE
  • languageId: FK language.id, CASCADE
  • translation: nvarchar(150)

User assignment

name: userRoles
columns:

  • id
  • roleId: FK role.id, CASCADE
  • userId: FK user.id, CASCADE

See also

Futures

  • add explicit deny functionality

core: users

System users

Description

A system user is an person who logs in the system. It is how the system views the entity as it interacts with it.

Tables

User

Name: Users
Column:

  • id
  • createdAt: datetime
  • updatedAt: datetime
  • updatedBy: userId, FK User.id, SET NULL
  • name: nvarchar(150), the users full name
  • login: nvarchar(300)
  • password: nbinary(max), the hashed password of the user

See also

  • #4: connection with roles

core: logs

Logs

Descriptions

Small, user action related logs, logged by both frontEnd and Backend.

Tables

Logs

Name: Log
Columns:

  • id
  • userId: FK user.id, CASCADE
  • createdAt: datetime
  • routeUrl: nvarchar(500)
  • type: nvarchar(15), type of the log, e.g. INFO, DEBUG, ERROR, VERBOSE, ...
  • description: nvarchar(MAX), the log description
  • data: JSON(MAX)

See also

  • #6: about users

core: permissions

Permissions

Description

A permission is a basic, granular unit of control, which gives a user or a role consent to perform an action in the system.

Tables

Permission

name:Permission
columns:

  • id
  • code: nvarchar(50)
  • description: nvarchar(300)

constraints:

  • code is unique

Relation with roles

Permissions are assigned to roles.
name: RolePermission
columns:

  • id
  • roleId: FK role.id, CASCADE
  • permissionId: FK permission.id, CASCADE

See also

core: salutation

Salutations

Description

General salutations, e.g. Mr, Mss, ...

Tables

Salutation

Name: Salutation
Columns:

  • id
  • description: nvarchar(50)

Salutation translations

Name: SalutationTranslation
Columns:

  • id
  • salutationId: FK salutation.id, CASCADE
  • translation": nvarchar(50)

core: languages

Languages

Description

Languages used in the system.

Tables

Language

Name: Language
Columns:

  • id
  • code: nvarchar(2)
  • description: nvarchar(150)
  • isCalculationLanguage: bool, indicates if this language can be used to create calculations in that language.

Constraints:

  • code is unique

Language translations

Name: LanguageTranslation
Columns:

  • id
  • languageId: FK language.id, CASCADE
  • targetLanguageId: FK language.id, CASCADE
  • translation: nvarchar(150)

core: system parameters

System parameters

Description

The default system parameters used by the system in various places.
e.g. DefaultLanguage

Tables

Parameters

Systemparameters can hold any value (text, bool or numbers).

Name: SystemParameter
Columns:

  • id
  • code
  • updatedAt
  • updatedBy
  • valueBool: bool?
  • valueText: nvarchar(MAX)
  • valueNumber: float
  • description: nvarchar(150)

Constraints:

  • code is unique

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.