work-v2

Tables (14)

enterprise (Untitled)

  • id (int) — int — Primary key — NOT NULL
  • managerId (Key) — int — Foreign key → user.id — NOT NULL
  • name (Field3) — varchar — NOT NULL
  • createdAt (Field) — datetime — NOT NULL
  • updatedAt (Field2) — datetime — NOT NULL

user (Untitled2)

  • id (Key) — int — Primary key — NOT NULL
  • name (Field3) — varchar — NOT NULL
  • createdAt (Field) — datetime — NOT NULL
  • updatedAt (Field2) — datetime — NOT NULL

workBase (Untitled9)

  • id (Key) — int — Primary key — NOT NULL
  • enterpriseId (int) — int — Foreign key → enterprise.id — NOT NULL
  • employeeId (Key2) — int — Foreign key → user.id — NOT NULL
  • payPerHour (Field3) — int — NOT NULL
  • isBreakPaid (Field4) — boolean — NOT NULL
  • isDeleted (Field5) — boolean — NOT NULL
  • createdAt (Field) — datetime — NOT NULL
  • updatedAt (Field2) — datetime — NOT NULL
  • deletedAt (Field6) — datetime

workMemo (Untitled3)

  • id (Key) — int — Primary key — NOT NULL
  • enterpriseId (int) — int — Foreign key → enterprise.id — NOT NULL
  • editorId (Key2) — int — Foreign key → user.id — NOT NULL
  • title (Field6) — varchar — NOT NULL
  • memo (Field5) — varchar — NOT NULL
  • accessType (Field7) — enum — NOT NULL
  • isDeleted (Field3) — boolean — NOT NULL
  • createdAt (Field) — datetime — NOT NULL
  • updatedAt (Field2) — datetime — NOT NULL
  • deletedAt (Field4) — datetime

workPermission (Untitled15)

  • id (Key) — int — Primary key — NOT NULL
  • enterpriseId (int) — int — Foreign key → enterprise.id — NOT NULL
  • employeeId (Key2) — int — Foreign key → user.id — NOT NULL
  • subject (Field) — enum — NOT NULL
  • level (Field2) — int — NOT NULL
  • createdAt (Field3) — datetime — NOT NULL
  • updatedAt (Field4) — datetime — NOT NULL

workRecord (Untitled8)

  • id (Key) — int — Primary key — NOT NULL
  • enterpriseId (int) — int — Foreign key → enterprise.id — NOT NULL
  • employeeId (Key2) — int — Foreign key → user.id — NOT NULL
  • workUnitId (Key3) — int — Foreign key → workUnit.id — NOT NULL
  • clockDate (Field7) — datetime — NOT NULL
  • clockTime (Field8) — datetime — NOT NULL
  • isValid (Field6) — boolean — NOT NULL
  • isModified (Field) — boolean — NOT NULL
  • isDeleted (Field2) — boolean — NOT NULL
  • createdAt (Field3) — timestamp — NOT NULL
  • updatedAt (Field4) — timestamp — NOT NULL
  • deletedAt (Field5) — timestamp — NOT NULL

workRecordHistory (Untitled10)

  • id (Key) — int — Primary key — NOT NULL
  • fromWorkRecordId (Key3) — int — Foreign key → workRecord.id — NOT NULL
  • toWorkRecordId (Key4) — int — Foreign key → workRecord.id — NOT NULL
  • modifiedBy (Key2) — int — Foreign key → user.id — NOT NULL
  • isDeleted (Field3) — boolean — NOT NULL
  • createdAt (Field) — datetime — NOT NULL
  • updatedAt (Field2) — datetime — NOT NULL
  • deletedAt (Field4) — datetime

workRecordMemo (Untitled13)

  • workRecordId (Key) — int — Foreign key → workRecord.id — NOT NULL
  • workMemoId (Key2) — int — Foreign key → workMemo.id — NOT NULL

workSchedule (Untitled5)

  • id (Key) — int — Primary key — NOT NULL
  • enterpriseId (int) — int — Foreign key → enterprise.id — NOT NULL
  • employeeId (Key3) — int — Foreign key → user.id — NOT NULL
  • createdBy (Key2) — int — Foreign key → user.id — NOT NULL
  • groupId (Key4) — int — Foreign key → workScheduleGroup.id — NOT NULL
  • scheduleType (Field9) — enum — NOT NULL
  • rangeFrom (Field) — datetime — NOT NULL
  • rangeTo (Field2) — datetime — NOT NULL
  • payPerHour (Field3) — int — NOT NULL
  • breakMinutes (Field11) — int — NOT NULL
  • isBreakPaid (Field12) — boolean — NOT NULL
  • isCommutable (Field10) — boolean — NOT NULL
  • isSettleable (Field13) — boolean — NOT NULL
  • isAuthorized (Field14) — boolean — NOT NULL
  • isShifted (Field4) — boolean — NOT NULL
  • isDeleted (Field5) — boolean — NOT NULL
  • createdAt (Field6) — datetime — NOT NULL
  • updatedAt (Field7) — datetime — NOT NULL
  • deletedAt (Field8) — datetime

workScheduleGroup (Untitled4)

  • id (Key) — int — Primary key — NOT NULL
  • isDeleted (Field4) — boolean — NOT NULL
  • createdAt (Field) — datetime — NOT NULL
  • updatedAt (Field2) — datetime — NOT NULL
  • deletedAt (Field3) — datetime

workScheduleMemo (Untitled12)

  • workScheduleId (Key) — int — Foreign key → workSchedule.id — NOT NULL
  • workMomoId (Key2) — int — Foreign key → workMemo.id — NOT NULL

workShift (Untitled11)

  • id (Key) — int — Primary key — NOT NULL
  • enterpriseId (int) — int — Foreign key → enterprise.id — NOT NULL
  • employeeId (Key5) — int — Foreign key → user.id — NOT NULL
  • modifiedBy (Key4) — int — Foreign key → user.id — NOT NULL
  • fromWorkScheduleId (Key2) — int — Foreign key → workSchedule.id — NOT NULL
  • fromClocInDate (Field) — datetime — NOT NULL
  • fromClockOutDate (Field2) — datetime — NOT NULL
  • toWorkScheduleId (Key3) — int — Foreign key → workSchedule.id — NOT NULL
  • isDeleted (Field6) — boolean — NOT NULL
  • createdAt (Field3) — datetime — NOT NULL
  • updatedAt (Field4) — datetime — NOT NULL
  • deletedAt (Field7) — datetime

workShiftMemo (Untitled14)

  • workShiftId (Key2) — int — Foreign key → workShift.id — NOT NULL
  • workMemoId (Key) — int — Foreign key → workMemo.id — NOT NULL

workUnit (Untitled6)

  • id (Key) — int — Primary key — NOT NULL
  • workScheduleId (Key2) — int — Foreign key → workSchedule.id — NOT NULL
  • unitType (Field5) — enum — NOT NULL
  • dayOfWeek (Field) — int — NOT NULL
  • clockDate (Field6) — datetime
  • clockTime (Field2) — time — NOT NULL
  • padLeftMinutes (Field7) — int
  • paddingRightMinutes (Field8) — int
  • calibrateLeftMinutes (Field9) — int
  • calibrateRightMinutes (Field10) — int
  • createdAt (Field3) — datetime — NOT NULL
  • updatedAt (Field4) — datetime — NOT NULL